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.


1 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]],
      
    
Made with ❤️ on ABP v9.0.0-preview Updated on September 27, 2024, 06:34