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
{{ message }}
This repository has been archived by the owner on Sep 5, 2024. It is now read-only.
Hello guys!
I think I found a bug for md-search-test-change.
This directive can't detect search text is empty if user do this :
If user first type: "abc", the md-search-text-change do will be called. There is no problem.
However, if the user firstly input a word "abc" in the input box and then delete them together or just press delete on the keyboard ,the md-search-text-change won't get a chance to call.....
Which means: there is no way to determine if the search text is empty or not.
I know there is a button at the end for input box. If we press that clean button, the search text will gone. and the model bind to md-selected-item will gone....
Question is: you can't force user to press that button to clean the selectItem model ...
Anyone know , how to tell if the search text is empty when user clean them by the way I gave?
The text was updated successfully, but these errors were encountered:
I checkout the source code of angular-material.js
on line: 10181 function handleSearchText may need to fix.
if the searchText is empty and length is less than the minLength, it will return the function .
The last two lines:
if ($scope.textChange && searchText !== previousSearchText)
$scope.textChange(getItemScope($scope.selectedItem)); won't even got called.
So we can't just return the function we still need to check the searchText and previousSearchText.
if previousSearchText is no undefined (which means it do have a value). .... then we need to run another logic. Otherwise, any function in md-search-text-change won't get called.
Hello guys!
I think I found a bug for md-search-test-change.
This directive can't detect search text is empty if user do this :
If user first type: "abc", the md-search-text-change do will be called. There is no problem.
However, if the user firstly input a word "abc" in the input box and then delete them together or just press delete on the keyboard ,the md-search-text-change won't get a chance to call.....
Which means: there is no way to determine if the search text is empty or not.
I know there is a button at the end for input box. If we press that clean button, the search text will gone. and the model bind to md-selected-item will gone....
Question is: you can't force user to press that button to clean the selectItem model ...
Anyone know , how to tell if the search text is empty when user clean them by the way I gave?
The text was updated successfully, but these errors were encountered: