Skip to content

[Feature Request]: No character limit in FilterableMultiSelect and Combobox can cause platform crashes #18852

@asadbekabduvoitov-nordra

Description

The problem

The FilterableMultiSelect and Combobox components in Carbon Design System do not enforce a character limit on input values. This allows users to input excessively long strings, potentially leading to performance issues or crashes, especially when handling large datasets or rendering complex UIs.

Expected Behavior:

  • The components should provide an optional prop to define a maximum character limit.
  • If the input exceeds the limit, it should be truncated or blocked.

This issue was identified during real-world usage where a user input an extremely long value, causing the platform to become unresponsive. Implementing a character limit will help prevent such scenarios and improve overall component stability.

The solution

Proposed Solution:

  • Introduce a maxLength prop for both components.
  • Ensure input is validated and restricted based on maxLength.
  • Optionally, display a visual indicator when the limit is reached.

Examples

Steps to Reproduce:

  • Navigate to a page using FilterableMultiSelect or Combobox.
  • Type or paste a very long string (e.g., 2,000+ characters).
  • Observe potential lag, high memory usage, or unresponsive UI behavior.

Package

@carbon/react

Application/PAL

No response

Business priority

None

Available extra resources

No response

Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Projects

    Status

    Later 🧊

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions