scania-digital-design-system/sdds

[Feature Request]: Expose onInput event on textfield and textarea

Closed this issue · 3 comments

Requirements before reporting

  • No duplicated issue reported
  • I have read the contribution guidelines
  • I have checked the lastest version if the feature exist there

Type of feature request

Functionality

What is your feature request?

Components textfield and textarea only expose a customChange event that is only triggered when focus is lost from the field.
In situations where I would like to take action while the user is still typing the component is useless.

Background

The lack of this feature makes it harder to migrate existing applications that are more interactive with the user.

Idea

Internally both components already listen to the onInput event from the input/textarea html tag, it would just be a matter of emitting a new event with the value at the same time.

Goals and objectives

I can easily run validations on text input/textarea and/or providing suggestions to the user while he is still typing.

Timeline

No response

Resources

No response

Contact information

thiago.oliveira@scania.com

Should it be called onInputChange?

Should it be called onInputChange?

Either that or customInputChange to be consistent with the already existing event.