You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A good example to describe the problem is to have a primer-text-field as a search field. The search field triggers a background request to refresh the results when its value is changed. The clear button for the search field will not work the same way as manually clearing the search field's value, because it will not emit an input event. Without the input event on the #clearContents, the background request would not be triggered.
A possible workaround would be to bind the background request directly on the clear button too. Unfortunately there is no simple way to bind events to the clear button, because event binding to the clear button is not possible via the primer-text-field component declaration.
My proposed solution is to emit an input event when the clear button is pressed, please see the PR attached.
The text was updated successfully, but these errors were encountered:
A good example to describe the problem is to have a
primer-text-field
as a search field. The search field triggers a background request to refresh the results when its value is changed. The clear button for the search field will not work the same way as manually clearing the search field's value, because it will not emit aninput
event. Without theinput
event on the#clearContents
, the background request would not be triggered.A possible workaround would be to bind the background request directly on the clear button too. Unfortunately there is no simple way to bind events to the clear button, because event binding to the clear button is not possible via the
primer-text-field
component declaration.My proposed solution is to emit an
input
event when the clear button is pressed, please see the PR attached.The text was updated successfully, but these errors were encountered: