aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/FieldsDropdown.tsx
diff options
context:
space:
mode:
authorZachary Zhang <zacharyzhang7@gmail.com>2024-08-31 00:46:29 -0400
committerZachary Zhang <zacharyzhang7@gmail.com>2024-08-31 00:46:29 -0400
commit196294f331496262bef256da8b8e9dbc80288bea (patch)
tree85ff27b7a8070585f9a5ef71dff63566e03232ba /src/client/views/FieldsDropdown.tsx
parent0cf61501ec9be34294935f01973c1bd9cad6d267 (diff)
parentc36607691e0b7f5c04f3209a64958f5e51ddd785 (diff)
Merge branch 'master' into zach-starter
Diffstat (limited to 'src/client/views/FieldsDropdown.tsx')
-rw-r--r--src/client/views/FieldsDropdown.tsx8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/client/views/FieldsDropdown.tsx b/src/client/views/FieldsDropdown.tsx
index 0ea0ebd83..407031b40 100644
--- a/src/client/views/FieldsDropdown.tsx
+++ b/src/client/views/FieldsDropdown.tsx
@@ -29,7 +29,7 @@ interface fieldsDropdownProps {
@observer
export class FieldsDropdown extends ObservableReactComponent<fieldsDropdownProps> {
@observable _newField = '';
- constructor(props: any) {
+ constructor(props: fieldsDropdownProps) {
super(props);
makeObservable(this);
}
@@ -101,13 +101,13 @@ export class FieldsDropdown extends ObservableReactComponent<fieldsDropdownProps
}),
}}
placeholder={typeof this._props.placeholder === 'string' ? this._props.placeholder : this._props.placeholder?.()}
- options={options as any}
+ options={options}
isMulti={false}
- onChange={val => this._props.selectFunc((val as any as { value: string; label: string }).value)}
+ onChange={val => this._props.selectFunc((val as { value: string; label: string }).value)}
onKeyDown={e => {
if (e.key === 'Enter') {
runInAction(() => {
- this._props.selectFunc((this._newField = (e.nativeEvent.target as any)?.value));
+ this._props.selectFunc((this._newField = (e.nativeEvent.target as HTMLSelectElement)?.value));
});
}
e.stopPropagation();