Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow resetting all hidden RichTextInputs of a LocalizedRichTextInput #2631

Open
kark opened this issue Oct 20, 2023 · 0 comments
Open

Allow resetting all hidden RichTextInputs of a LocalizedRichTextInput #2631

kark opened this issue Oct 20, 2023 · 0 comments

Comments

@kark
Copy link
Contributor

kark commented Oct 20, 2023

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:

  1. Go to https://uikit.commercetools.com/?path=/story/components-inputs--localizedrichtextinput
  2. Click on Set initial value -> enter the initial values -> Click Reset
  3. Click on Show all languages
  4. 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 useImperativeHandle hook) with another solution
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant