ui5-webcomponents icon indicating copy to clipboard operation
ui5-webcomponents copied to clipboard

Feature Request: Select all text on focus in the Input component

Open mrmabo opened this issue 1 year ago • 3 comments

Is your feature request related to a problem?

Description

Background The current requirement is that when a user focuses on an Input component, if the input contains a default value (e.g., "Not Selected") or any characters , the UI should automatically select all the text in the input field, mimicking a "Select All" operation.

Problem Currently, the @ui5/webcomponents-react Input component does not provide built-in support for this behavior (e.g., through a configuration option or method). I would like to explore if there's a solution for implementing this functionality or if there are plans to support it natively.

image

Describe the solution you'd like

Could there be an option or method to support this behavior, such as:

  • Adding a boolean property selectOnFocus that, when set to true, enables this auto-select feature.

  • Providing a method that developers can call to achieve this functionality.

Describe alternatives you've considered

No response

Additional Context

No response

Organization

No response

Declaration

  • [X] I’m not disclosing any internal or sensitive information.

mrmabo avatar Dec 04 '24 19:12 mrmabo

Thanks for reporting! I'll forward this issue to our UI5 Web Components Colleagues as the affected component is developed in their repository.

MarcusNotheis avatar Dec 05 '24 07:12 MarcusNotheis

Hi colleagues @SAP/ui5-webcomponents-topic-rl,

Could you please take a look at that feature request ?

Best Regards, Stoyan

hinzzx avatar Dec 05 '24 07:12 hinzzx

After discuss with our UX, we don't need additional user interaction. Hence closing this ticket.

mrmabo avatar Dec 05 '24 19:12 mrmabo