Skip to content
This repository has been archived by the owner on Sep 5, 2024. It is now read-only.

fix(autocomplete): don't show the loading bar when hitting escape on an empty input #7934

Closed
wants to merge 1 commit into from

Conversation

crisbeto
Copy link
Member

@crisbeto crisbeto commented Apr 7, 2016

The loading bar was being shown if the user pressed escape on an empty autocomplete input.

Closes #7927.

@crisbeto crisbeto added the needs: review This PR is waiting on review from the team label Apr 7, 2016
@@ -618,7 +618,7 @@ function MdAutocompleteCtrl ($scope, $element, $mdUtil, $mdConstant, $mdTheming,
// Set the loading to true so we don't see flashes of content.
// The flashing will only occour when an async request is running.
// So the loading process will stop when the results had been retrieved.
setLoading(true);
if ($scope.searchText) setLoading(true);
Copy link
Member

Choose a reason for hiding this comment

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

I think, since the clear button is hidden, when the search text is empty, the autocomplete should not call clearValue() when pressing ESC as well.

Copy link
Member Author

Choose a reason for hiding this comment

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

That works too, thanks for the input.

…an empty input

The loading bar was being shown if the user pressed escape on an empty autocomplete input.

Closes angular#7927.
@devversion
Copy link
Member

LGTM now.

@devversion devversion added pr: merge ready This PR is ready for a caretaker to review and removed needs: review This PR is waiting on review from the team labels Apr 7, 2016
ilovett pushed a commit to ilovett/material that referenced this pull request Apr 22, 2016
…an empty input

The loading bar was being shown if the user pressed escape on an empty autocomplete input.

Closes angular#7927.

Closes angular#7934
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
pr: merge ready This PR is ready for a caretaker to review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants