Skip to content

Conversation

@ilhan007
Copy link
Contributor

@ilhan007 ilhan007 commented Mar 13, 2019

Bind to the native input "change" event and fire the ui5-input semantic one.
Manually fire "change", when suggestion item is selected.
Fixes: #154

Firing change event used to rely on the user input and did not
consider changes through the "value" property. Now such changes are taken into count.
In addition, the change event is also fired whenever suggestion item is selected.
The issue can be observed in the ui5-datepicker. When the user types "tomorrow" and presses ENTER,
everything is fine, the value in the input field changes to the particular date.
But, when the user types "tomorrow" again - nothing happens, as the internal ui5-input does not fire "change" event.
Fixes: #154
@ilhan007 ilhan007 requested review from MapTo0 and pskelin March 13, 2019 07:23
Bind to the native input "change" event and fire the ui5-input semantic one.
Manually fire "change", when suggestion item is selected.
Fixes: #154
@ilhan007 ilhan007 changed the title fix(ui5-input): fire change when value is mutated via API fix(ui5-input): fire change in sync with the native input Mar 13, 2019
MapTo0
MapTo0 previously approved these changes Mar 13, 2019
Copy link
Contributor

@MapTo0 MapTo0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would be happy if we also add a test for the datepicker's issue

@ilhan007
Copy link
Contributor Author

I would be happy if we also add a test for the datepicker's issue

done

@ilhan007 ilhan007 merged commit 55fa533 into master Mar 13, 2019
@ilhan007 ilhan007 deleted the fix-input-change-event branch March 13, 2019 15:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants