Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Cast the value as an Array in CheckboxesWidget #3379

Merged

Commits on Jan 15, 2023

  1. fix: Cast the value as an Array in CheckboxesWidget

    Fixes rjsf-team#2141 by reimplementing rjsf-team#2142
    
    When the value passed to the `CheckboxesWidget` was a single value rather than an array, things would break in the control
    - Updated the `CheckboxesWidget` in all themes but `antd` (which uses simpler logic) to fix ensure the value used in the helper functions is an array
    - Added a test in `ArrayField_test.ts` that verifies the fix
    - Updated the snapshot in `bootstrap-4` which showed an issue when the value string contained an element of the enumeration value rather than the whole value
    - Refactored the common `selectValue` and `deselectValue` functions used in `CheckboxesWidget` into `@rjsf/utils`
    - Updated the `CHANGELOG.md` accordingly
    heath-freenome committed Jan 15, 2023
    Configuration menu
    Copy the full SHA
    f6b0bb9 View commit details
    Browse the repository at this point in the history

Commits on Jan 16, 2023

  1. - Responded to reviewer feedback, including refactoring the `enumOpti…

    …onsDeselectValue()` and `enumOptionsSelectValue()` from all the `CheckboxesWidget` implementations into `@rjsf/utils`
    heath-freenome committed Jan 16, 2023
    Configuration menu
    Copy the full SHA
    ce84edf View commit details
    Browse the repository at this point in the history