DEV: Support for `onChange` on `{{text-field}}` (PR #9362)

This will automatically be debounced and only fired when the value changes.

There is also onChangeImmediate which is not debounced in case you need that, but in almost all cases when observing text in an element you should debounce.

GitHub

This will throw an exception if you leave page during debounce timer

I have a more general question though, why would we want to use {{text-field}} over {{input}} ?

I now cancel it, good catch.

I have a more general question though, why would we want to use {{text-field}} over {{input}} ?

The main reason is to include stuff we always want to do. This used to include a placeholder (which is now doable other ways, but it still has RTL helpers which are useful.

I have a more general question though, why would we want to use {{text-field}} over {{input}} ?

The main reason is to include stuff we always want to do. This used to include a placeholder (which is now doable other ways, but it still has RTL helpers which are useful.

I mean why would you directly use text-field an not input in the codebase ?