diff --git a/src/components/dropdown/Dropdown.d.ts b/src/components/dropdown/Dropdown.d.ts index 55f48a341d..2f7efd3ffe 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 594eb1710c..35979dffff 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 f55f2052e8..1eeab73d04 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 b5fa64f26b..4f69210108 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 8cea9e4816..4a66e7b2e0 100755 --- a/src/views/dropdown/DropdownDoc.vue +++ b/src/views/dropdown/DropdownDoc.vue @@ -157,7 +157,7 @@ export default { optionDisabled - boolean + string | function null Property name or getter function to use as the disabled flag of an option, defaults to false when not defined. diff --git a/src/views/listbox/ListboxDoc.vue b/src/views/listbox/ListboxDoc.vue index 599dfc61ba..d303f65795 100755 --- a/src/views/listbox/ListboxDoc.vue +++ b/src/views/listbox/ListboxDoc.vue @@ -154,7 +154,7 @@ export default { optionDisabled - boolean + string | function null Property name or getter function to use as the disabled flag of an option, defaults to false when not defined. diff --git a/src/views/multiselect/MultiSelectDoc.vue b/src/views/multiselect/MultiSelectDoc.vue index 014a9c5fd1..aa618d0154 100755 --- a/src/views/multiselect/MultiSelectDoc.vue +++ b/src/views/multiselect/MultiSelectDoc.vue @@ -166,7 +166,7 @@ export default { optionDisabled - boolean + string | function null Property name or getter function to use as the disabled flag of an option, defaults to false when not defined. diff --git a/src/views/selectbutton/SelectButtonDoc.vue b/src/views/selectbutton/SelectButtonDoc.vue index 8eab68eae8..ae4715c198 100755 --- a/src/views/selectbutton/SelectButtonDoc.vue +++ b/src/views/selectbutton/SelectButtonDoc.vue @@ -96,7 +96,7 @@ export default { optionDisabled - boolean + string | function null Property name or getter function to use as the disabled flag of an option, defaults to false when not defined.