private void OnKeyDownShortcut(KeyDownEvent evt) { if (evt.keyCode == KeyCode.Escape) { SearchCancelButtonClick(); SearchCancelButton.Focus(); evt.StopImmediatePropagation(); return; } if (evt.keyCode == KeyCode.Tab) { OnFocusChange(); evt.StopImmediatePropagation(); } }
private void OnSearchTextFieldChange(ChangeEvent <string> evt) { if (showingPlaceHolder && evt.newValue == kPlaceHolder) { return; } if (!string.IsNullOrEmpty(evt.newValue)) { SearchCancelButton.AddToClassList("on"); } else { SearchCancelButton.RemoveFromClassList("on"); } searchText = evt.newValue; OnSearchChange(searchText); }
public new void SetEnabled(bool enable) { base.SetEnabled(enable); SearchTextField.SetEnabled(enable); SearchCancelButton.SetEnabled(enable); }