feat(web/select): searchable option (#513)

This commit is contained in:
Lily
2024-03-10 06:06:11 -07:00
committed by GitHub
parent 669dc5ae87
commit 71b30b928d
4 changed files with 5 additions and 0 deletions

View File

@@ -63,6 +63,7 @@ interface SelectProps extends BaseInput {
disabled?: boolean;
default?: string | string[];
clearable?: boolean;
searchable?: boolean;
}
interface SliderProps extends BaseInput {

View File

@@ -19,6 +19,7 @@ local input
---@field format? string
---@field returnString? boolean
---@field clearable? boolean
---@field searchable? boolean
---@field description? string
---@class InputDialogOptionsProps

View File

@@ -32,6 +32,7 @@ const SelectField: React.FC<Props> = (props) => {
description={props.row.description}
withAsterisk={props.row.required}
clearable={props.row.clearable}
searchable={props.row.searchable}
icon={props.row.icon && <LibIcon icon={props.row.icon} fixedWidth />}
/>
) : (
@@ -49,6 +50,7 @@ const SelectField: React.FC<Props> = (props) => {
description={props.row.description}
withAsterisk={props.row.required}
clearable={props.row.clearable}
searchable={props.row.searchable}
icon={props.row.icon && <LibIcon icon={props.row.icon} fixedWidth />}
/>
)}

View File

@@ -37,6 +37,7 @@ export type OptionValue = { value: string; label?: string };
export interface ISelect extends BaseField<'select' | 'multi-select', string | string[]> {
options: Array<OptionValue>;
clearable?: boolean;
searchable?: boolean;
}
export interface INumber extends BaseField<'number', number> {