mirror of
https://github.com/CommunityOx/ox_lib.git
synced 2026-08-17 06:56:03 +01:00
feat(interface/multi-select): add maxSelectedValues (#563)
This commit is contained in:
@@ -64,6 +64,7 @@ interface SelectProps extends BaseInput {
|
|||||||
default?: string | string[];
|
default?: string | string[];
|
||||||
clearable?: boolean;
|
clearable?: boolean;
|
||||||
searchable?: boolean;
|
searchable?: boolean;
|
||||||
|
maxSelectedValues?: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface SliderProps extends BaseInput {
|
interface SliderProps extends BaseInput {
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ local input
|
|||||||
---@field clearable? boolean
|
---@field clearable? boolean
|
||||||
---@field searchable? boolean
|
---@field searchable? boolean
|
||||||
---@field description? string
|
---@field description? string
|
||||||
|
---@field maxSelectedValues? number
|
||||||
|
|
||||||
---@class InputDialogOptionsProps
|
---@class InputDialogOptionsProps
|
||||||
---@field allowCancel? boolean
|
---@field allowCancel? boolean
|
||||||
|
|||||||
@@ -51,6 +51,7 @@ const SelectField: React.FC<Props> = (props) => {
|
|||||||
withAsterisk={props.row.required}
|
withAsterisk={props.row.required}
|
||||||
clearable={props.row.clearable}
|
clearable={props.row.clearable}
|
||||||
searchable={props.row.searchable}
|
searchable={props.row.searchable}
|
||||||
|
maxSelectedValues={props.row.maxSelectedValues}
|
||||||
icon={props.row.icon && <LibIcon icon={props.row.icon} fixedWidth />}
|
icon={props.row.icon && <LibIcon icon={props.row.icon} fixedWidth />}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
|
|||||||
@@ -38,6 +38,7 @@ export interface ISelect extends BaseField<'select' | 'multi-select', string | s
|
|||||||
options: Array<OptionValue>;
|
options: Array<OptionValue>;
|
||||||
clearable?: boolean;
|
clearable?: boolean;
|
||||||
searchable?: boolean;
|
searchable?: boolean;
|
||||||
|
maxSelectedValues?: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface INumber extends BaseField<'number', number> {
|
export interface INumber extends BaseField<'number', number> {
|
||||||
|
|||||||
Reference in New Issue
Block a user