mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
Closes https://github.com/elastic/kibana/issues/187382 ## Summary This PR separates out the previously memoized `CompatibleControlTypesComponent` into a separate component that accepts **props** for the fields that it is dependant on rather than relying on the dependencies to the `useMemo` function. This is because, previously, we had an extra dependency in the dependency array (`controlType`) that was causing the memoized component to render too many times and it was causing a weird bug where the old "disabled" menu item wasn't getting unmounted properly. | Before | After | |--------|--------| | , via [source,bash] ---- yarn start --run-examples ----