Closed f4irline closed 7 months ago
This fix is very nice, but we'd rather publish it with version 14.0.0 which is coming just around the corner. Is there a specific reason why you would need it with version 13?
This fix is very nice, but we'd rather publish it with version 14.0.0 which is coming just around the corner. Is there a specific reason why you would need it with version 13?
@riitasointi alright, sounds good! I wasn't aware that the v14 is coming soonish, we can just use a local patch in our project until v14 is released and we're able to update to it.
Note:
This is the same fix as in #849, just targeted towards
master
-branch so that thev13
version can be patched.Description
Popover positioning was not updated properly on the
MultiSelect
compoennt when it was used in a container with dynamic dimensions. For example when using theMultiSelect
component in a modal, as the user selects items from the multiselect the modal would resize and the popover would get "detached" from the multiselect input.This was fixed by introducing a React context for the
Popover
component which contains anupdatePopover
-function. TheupdatePopover
function should be called in the context whenever thePopover
should call thereact-popper
providedupdate
function, which would handle calculating the position again.Related Issue
Closes #848
Motivation and Context
This was done because using the
MultiSelect
component in a container which's dimensions may change dynamically was not possible due to the positioning issue mentioned in #848How Has This Been Tested?
Styleguidist. I created a
Modal
with aMultiSelect
component inside it with and tested it locally. I can create a proper example to the Modal-section of the Styleguidist with aMultiSelect
component if you wish.Screenshots (if appropriate):
Release notes
MultiSelect
MultiSelect
component would be detached from the input field if the dimensions of the container containing theMultiSelect
change. This would happen e.g. if using theMultiSelect
component inside aModal
component.