Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(ui5-input): fire change in sync with the native input #168

Merged
merged 7 commits into from
Mar 13, 2019

Conversation

ilhan007
Copy link
Member

@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 pskelin and MapTo0 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
Member

@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
Member 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.

2 participants