react-filters
react-filters copied to clipboard
toggling disabled state does not re-render
I am passing in objects to the value
prop, which live in state of the container to a <Group value={this.state.options} />
My object looks like { id: 0, label: "option 1", disabled: true }
and passed in an array to Group as per docs.
however, the Toggle
component does not re-render when the disabled
prop changes on the object as it only checks for value
prop. I see the API defines this as a boolean but is there a better way to pass dynamic options to Toggle?
https://github.com/ritz078/react-filters/blob/1c1aee5db893a327a2c4c4626af41c3c01fe06b1/components/Toggle/Toggle.jsx#L54
https://github.com/ritz078/react-filters/pull/29/files added the ability to pass a disabled prop to the group but I believe this should also check for disabled
prop on each formattedValue