Skip to content

Allow resetting all hidden RichTextInputs of a LocalizedRichTextInput #2631

@kark

Description

@kark

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions