Starts in:
3 DAYS
3 HRS
37 MIN
22 SEC
Starts in:
3 D
3 H
37 M
22 S
Open Closed

[BUG] ABPSuite handles Checkboxes incorrectly #7969


User avatar
0
improwise created
  • ABP Framework version: v8.3
  • UI Type: Angular (probably more)

ABP Suite incorrectly handles checkboxes, at least when using Angular. It marks the controls as required (*) even though the form can submit regardless of value (selected / not selected) which in correct but it should not be required. It also gets the default value wrong, making it selected for new items even though you have selected the opposite. There are no options in ABP Suite for not required, nullable etc for Boolean values (which renders as checkboxes).

Correct behavior should be that it is not required (at least not unless you can select that in ABP Suite) and also that default value is what you tell it to be in ABP Suite.


3 Answer(s)
  • User Avatar
    0
    improwise created

    The error is here in this generated code where it is trying to assign string values for true and false instead of the boolean values (ie remove '' and it will work). Also, the [Validators.required] should probably be removed as well.

      published: [published ?? 'true', [Validators.required]],
      notificationOnPublish: [notificationOnPublish ?? 'false', [Validators.required]],
      
    
  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi,

    We will fix the problem, your ticket was refunded.

  • User Avatar
    0
    alper created
    Support Team Director

    Internal issue no: 18557

Made with ❤️ on ABP v9.1.0-preview. Updated on November 20, 2024, 13:06