carbon-for-ibm-dotcom icon indicating copy to clipboard operation
carbon-for-ibm-dotcom copied to clipboard

add "change" event for <bx-input>

Open wnwaynelee opened this issue 3 years ago • 2 comments

The problem

I am replacing <input type="text"> with <bx-input>. The UI renders fine. But <bx-input> seems to have "input" event only and not "change" event. You can test with the html file in test.zip.

When I inspect the DOM, I can see <bx-input> is backed by <input type="text">. The "input" event is good for implementing typeahead. For most cases, the "change" event is probably more useful/efficient.

The solution

Please add "change" event for <bx-input>. Please check other input backed by <input type="text"> and <textarea>, e.g. number input, text area input, .... Thanks.

Application/website

IBM

Business priority

High Priority = pressing release

What time frame would this ideally be needed by (if applicable)

No response

Examples

No response

Code of Conduct

wnwaynelee avatar Jul 25 '22 21:07 wnwaynelee

We've marked this issue as stale because there hasn't been any activity for 60 days. If there's no further activity on this issue in the next three days then we'll close it. You can keep the conversation going with just a short comment. Thanks for your contributions.

stale[bot] avatar May 27 '23 05:05 stale[bot]

Would also be handy to emit input events also.

kernel-io avatar Jul 22 '24 21:07 kernel-io

@andy-blum

This ticket was closed, but the request was not done, bx-input still do not emit input and change event ?

Why doing this ?

rccc avatar Jun 17 '25 16:06 rccc

I don't work on this project or IBM anymore. Contact @bruno-amorim or @marcelojcs

andy-blum avatar Jun 17 '25 16:06 andy-blum

Also, if I remember correctly, box elements are no longer part of this repo

andy-blum avatar Jun 17 '25 16:06 andy-blum

@rccc I have new issue which mostly removes the need for this, it's better if the elements implement 'ElementInternals' with form association than just emitting an 'input' event. It is over on the main carbon repo (where webcomponents now live)

kernel-io avatar Jun 18 '25 00:06 kernel-io