feat(interface/multi-select): add maxSelectedValues (#563)

This commit is contained in:
northsqrd
2024-05-07 20:28:52 +02:00
committed by GitHub
parent 9649ffaf67
commit 24cedb07ae
4 changed files with 4 additions and 0 deletions

View File

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

View File

@@ -21,6 +21,7 @@ local input
---@field clearable? boolean
---@field searchable? boolean
---@field description? string
---@field maxSelectedValues? number
---@class InputDialogOptionsProps
---@field allowCancel? boolean

View File

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

View File

@@ -38,6 +38,7 @@ export interface ISelect extends BaseField<'select' | 'multi-select', string | s
options: Array<OptionValue>;
clearable?: boolean;
searchable?: boolean;
maxSelectedValues?: number;
}
export interface INumber extends BaseField<'number', number> {