SearchTextField icon indicating copy to clipboard operation
SearchTextField copied to clipboard

userStoppedTypingHandler keeps calling after user stops typing

Open Praburaj-Krishnan opened this issue 8 years ago • 1 comments

userStoppedTyping handler keeps invoking after the user stops typing the text.

    hospitalNameTextField.startVisible = true
    hospitalNameTextField.startVisibleWithoutInteraction = true
    
    hospitalNameTextField.userStoppedTypingHandler =
    {
        if let criteria = self.hospitalNameTextField.text
        {
            if criteria.characters.count > 0 && criteria.characters.count % 3 == 0
            {
                self.hospitalNameTextField.showLoadingIndicator()
                self.searchForHospitalNames(searchText: criteria)
                {
                    results in
                    self.hospitalNameTextField.filterItems(results)
                    self.hospitalNameTextField.stopLoadingIndicator()
                }
            }
        }
    }
    
    hospitalNameTextField.theme = SearchTextFieldTheme.lightTheme()
    
    hospitalNameTextField.itemSelectionHandler =
    {
        item, itemPosition in
        self.hospitalNameTextField.text = item[itemPosition].title
    }

Praburaj-Krishnan avatar Sep 19 '17 08:09 Praburaj-Krishnan

Yes. I am also getting same issue. Just needed like send request when user tap the key board.

viswanath3344 avatar May 08 '18 10:05 viswanath3344