Closed haydenlinder closed 5 months ago
@haydenlinder thanks for the issue. This one is "fun".
The problem is this: https://github.com/data-driven-forms/react-forms/commit/c0eb916b817a7c2856ea5f47a659ffa47184808a#diff-e562c6a6573e48431bc65138f034bae8830db07209229974efa6f1adc9736f8dR15
This was a change to move away from defaultProps
to inline default props. However, there is one pretty big side effect.
Component.defaultProps
props references never changes. But {options = []}
in the function arguments changes on each render. And because [] !== []
it triggers a hook that resets the options to an empty array. We can get around it by using memo and deep equal function. But it's pretty sneaky and will be less efficient.
:tada: This issue has been resolved in version 3.22.4 :tada:
The release is available on
Scope: <DESCRIBE SCOPE OF THIS ISSUE, i.e.: PF4 mapper, Form renderer>
This is for MUI mapper.
Description
Adding
isSearchable
to MUI Select withloadOptions
breaks loading. When you type your search, none of the options show up.Schema
You can reproduce here by adding
isSearchable: true
.<If it's possible, please provide a schema which reproduces the issue>