Exemple #1
0
    private IEnumerator SearchWhileTypingRoutine()
    {
        SetTypingMode();

        while ((Time.unscaledTime - lastValueChangeTime) < IDLE_TYPE_TIME_TRIGGER_SEARCH)
        {
            yield return(null);
        }

        string value = inputField.text;

        if (string.IsNullOrEmpty(value))
        {
            SetClearMode();
        }
        else
        {
            SetSearchMode();
        }

        OnSearchText?.Invoke(value);
        searchWhileTypingRoutine = null;
    }
Exemple #2
0
 private void OnSubmit(string value)
 {
     StopSearchWhileTyping();
     SetSearchMode();
     OnSearchText?.Invoke(value);
 }
Exemple #3
0
 private void OnClear()
 {
     inputField.SetTextWithoutNotify(string.Empty);
     SetClearMode();
     OnSearchText?.Invoke(string.Empty);
 }
Exemple #4
0
 private void OnSearch(string value)
 {
     OnSearchText?.Invoke(value);
 }