Weird behavior on Choice Chips Set Form Field and Reset Form Field

Context:
On an industry selection page, you can toggle a checkbox to select/unselect all industries.

Current implentation:
On toggle on, set form field (choice chips) to a constant that store all industry values. On toggle off, reset form field (choice chips)


Expectation:
On toggle on, all industries selected; On toggle off, all industries unselected

Bug:
Choice chips doesn't function properly after setting / resetting form field:

  • when there are initial selected chips, after selecting all and unselecting all, expect no chips selected, but the initial chips are still there

  • doesn't allow me to unselect certain chips after setting all chips to true (unselect a single chip cause everything to be unselected)

    Screen Recording 2023-11-20 at 1.49.56 PM.mov
    4.71MB

    Appreciate any guidance on this!

2
6 replies