Skip to content

[bug]: Dynamically created inputs are not being able to get focus within table cell #798

Open
@yf-hk

Description

@yf-hk

What version of strapi-design-system are you using?

  • Strapi Design System Version: 1.2.7

What's Wrong?

I'm using Table and TextInput to customize Strapi's admin panel. Previously the design system works fine with dynamically created rows and TextInputs within the table cell. However not sure since which version, it doesn't work any more. When clicking on any input element it will be unfocused immediately. After hours of debuging I found that it was due to the focus event for these controls. focusableNodes in https://github.com/strapi/design-system/blob/fe27b82d12f8cd9875518adbefc478877e7fb5a7/packages/strapi-design-system/src/RawTable/RawCell.js doesn't reflex any newly added items.
This is really very rigid. Please consider allowwing dynamically created inputs to get focus.

To Reproduce

Create a Table, and within Td, add some TextInputs using Javascript, then try to click the newly created inputs, they will get unfocused immediately

Expected Behaviour

All input fields should be able to get focus except the disabled ones.

Metadata

Metadata

Assignees

No one assigned

    Labels

    issue: bugIssue reporting a bugseverity: lowIf the issue only affects a very niche base of users and an easily implemented workaround can solvestatus: confirmedConfirmed by a Strapi Team member or multiple community members

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions