ui-kit
ui-kit copied to clipboard
Allow resetting all hidden RichTextInputs of a LocalizedRichTextInput
Describe the bug Currently, when the additional languages of the LocalizedRichTextInput are hidden, there is no method available to reset the hidden RichTextInputs.
To Reproduce Steps to reproduce the behavior:
- Go to https://uikit.commercetools.com/?path=/story/components-inputs--localizedrichtextinput
- Click on
Set initial value-> enter the initial values -> ClickReset - Click on
Show all languages - Notice that the previously hidden RichTextInputs won't reset
Additional context Hiding languages removes the RichTextInputs from DOM, therefore the refs do not work.
Consider:
- if hiding RichTextInputs by applying css styling that doesn't remove the RichTextInputs from DOM can solve this issue
- replacing current resetting solution (based on
useImperativeHandlehook) with another solution