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 typeahead selection in ImportDataSource component #3126

Merged
merged 2 commits into from
Nov 21, 2017

Conversation

adube
Copy link
Contributor

@adube adube commented Nov 20, 2017

This PR fixes the following issue: in the DataSourceBrowser component, the "connect" button was sometimes disabled after the selection of an item.

This was due to the fact that the field itself is of url type and there's an angular rule applied on the connect button that automatically disables it if the form is invalid. The selection using the drop-down list uses typeahead. Now, I don't know exactly why, but the selected value was not always properly copied in the model, i.e. it was pasted in the input field, but not the model.

This fix ensures that, after the selection of an item among the typeahead selections, the value is properly copied. At the same time, I do a "focus" on the connect button.

This solution keeps the url type on the field, because I think it's very useful to ensure that any url either selected or manually typed are valid urls.

@adube adube requested a review from fredj November 20, 2017 16:14
@fredj fredj force-pushed the 159-import-ds-fix-connect-btn branch from b4e8b57 to 582eff7 Compare November 21, 2017 07:51
@fredj
Copy link
Member

fredj commented Nov 21, 2017

I've fixed the remaining travis issue by using jQuery type instead of angular.JQLite

@fredj
Copy link
Member

fredj commented Nov 21, 2017

And because we have jquery loaded, angular.JQLite is just an alias to jQuery:
https://docs.angularjs.org/api/ng/function/angular.element#overview

@fredj fredj merged commit 409afdb into master Nov 21, 2017
@fredj fredj deleted the 159-import-ds-fix-connect-btn branch November 21, 2017 09:10
@sbrunner sbrunner added this to the 2.3 milestone Apr 12, 2018
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