diff options
author | Nathan-SR <144961007+Nathan-SR@users.noreply.github.com> | 2024-06-04 14:17:50 -0400 |
---|---|---|
committer | Nathan-SR <144961007+Nathan-SR@users.noreply.github.com> | 2024-06-04 14:17:50 -0400 |
commit | 22343f6ceb3175ff1794c4ff0ecda0471a7594af (patch) | |
tree | 79b8e3e987aa9fabb7fd8e8a50aab1c104964cff /src/client/views/EditableView.tsx | |
parent | d215534d6f0d66db9d5bf15f9fefef3fe5398024 (diff) |
key search on update
Diffstat (limited to 'src/client/views/EditableView.tsx')
-rw-r--r-- | src/client/views/EditableView.tsx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/client/views/EditableView.tsx b/src/client/views/EditableView.tsx index 5b691c507..c79cabd6a 100644 --- a/src/client/views/EditableView.tsx +++ b/src/client/views/EditableView.tsx @@ -57,6 +57,7 @@ export interface EditableProps { showKeyNotVal?: boolean; updateAlt?: (newAlt: string) => void; + updateSearch?: (value: string) => void; } /** @@ -122,6 +123,7 @@ export class EditableView extends ObservableReactComponent<EditableProps> { } else if (!this._overlayDisposer) { this._overlayDisposer = OverlayView.Instance.addElement(<DocumentIconContainer />, { x: 0, y: 0 }); } + this._props.updateSearch && this._props.updateSearch(targVal); }; @action @@ -183,7 +185,6 @@ export class EditableView extends ObservableReactComponent<EditableProps> { @action onClick = (e: React.MouseEvent) => { - if (this._props.GetValue() == 'None' && this._props.updateAlt) this._props.updateAlt('.'); if (this._props.editing !== false) { e.nativeEvent.stopPropagation(); if (this._ref.current && this._props.showMenuOnLoad) { |