diff --git a/src/components/dropdown/Dropdown.d.ts b/src/components/dropdown/Dropdown.d.ts index 55f48a341..2f7efd3ff 100755 --- a/src/components/dropdown/Dropdown.d.ts +++ b/src/components/dropdown/Dropdown.d.ts @@ -1,12 +1,14 @@ import { VNode } from 'vue'; import VirtualScrollerProps from '../virtualscroller'; +type DropdownOptionDisabledType = string | ((data: any) => boolean) | undefined; + interface DropdownProps { modelValue?: any; options?: any[]; optionLabel?: string; optionValue?: any; - optionDisabled?: boolean; + optionDisabled?: DropdownOptionDisabledType; optionGroupLabel?: string; optionGroupChildren?: string; scrollHeight?: string; diff --git a/src/components/listbox/Listbox.d.ts b/src/components/listbox/Listbox.d.ts index 594eb1710..35979dfff 100755 --- a/src/components/listbox/Listbox.d.ts +++ b/src/components/listbox/Listbox.d.ts @@ -1,12 +1,14 @@ import { VNode } from 'vue'; import VirtualScrollerProps from '../virtualscroller'; +type ListboxOptionDisabledType = string | ((data: any) => boolean) | undefined; + interface ListboxProps { modelValue?: any; options?: any[]; optionLabel?: string; optionValue?: any; - optionDisabled?: boolean; + optionDisabled?: ListboxOptionDisabledType; optionGroupLabel?: string; optionGroupChildren?: string; listStyle?: string; diff --git a/src/components/multiselect/MultiSelect.d.ts b/src/components/multiselect/MultiSelect.d.ts index f55f2052e..1eeab73d0 100755 --- a/src/components/multiselect/MultiSelect.d.ts +++ b/src/components/multiselect/MultiSelect.d.ts @@ -1,12 +1,14 @@ import { VNode } from 'vue'; import VirtualScrollerProps from '../virtualscroller'; +type MultiSelectOptionDisabledType = string | ((data: any) => boolean) | undefined; + interface MultiSelectProps { modelValue?: any; options?: any[]; optionLabel?: string; optionValue?: any; - optionDisabled?: boolean; + optionDisabled?: MultiSelectOptionDisabledType; optionGroupLabel?: string; optionGroupChildren?: string; scrollHeight?: string; diff --git a/src/components/selectbutton/SelectButton.d.ts b/src/components/selectbutton/SelectButton.d.ts index b5fa64f26..4f6921010 100755 --- a/src/components/selectbutton/SelectButton.d.ts +++ b/src/components/selectbutton/SelectButton.d.ts @@ -1,9 +1,11 @@ +type SelectButtonOptionDisabledType = string | ((data: any) => boolean) | undefined; + interface SelectButtonProps { modelValue?: any; options?: any[]; optionLabel?: string; optionValue?: any; - optionDisabled?: boolean; + optionDisabled?: SelectButtonOptionDisabledType; multiple?: boolean; disabled?: boolean; dataKey?: string; diff --git a/src/views/dropdown/DropdownDoc.vue b/src/views/dropdown/DropdownDoc.vue index 8cea9e481..4a66e7b2e 100755 --- a/src/views/dropdown/DropdownDoc.vue +++ b/src/views/dropdown/DropdownDoc.vue @@ -157,7 +157,7 @@ export default {