From bc702ed0da568287189a7334586f110e768f097b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tu=C4=9F=C3=A7e=20K=C3=BC=C3=A7=C3=BCko=C4=9Flu?= Date: Mon, 22 Nov 2021 15:56:59 +0300 Subject: [PATCH] Fixed #1815 - optionDisabled wrongly typed --- api-generator/components/dropdown.js | 2 +- api-generator/components/listbox.js | 2 +- api-generator/components/multiselect.js | 2 +- src/components/dropdown/Dropdown.d.ts | 2 +- src/components/listbox/Listbox.d.ts | 2 +- src/components/multiselect/MultiSelect.d.ts | 2 +- src/views/dropdown/DropdownDoc.vue | 2 +- src/views/listbox/ListboxDoc.vue | 2 +- src/views/multiselect/MultiSelectDoc.vue | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/api-generator/components/dropdown.js b/api-generator/components/dropdown.js index 5e7b7fa611..a8e825a922 100644 --- a/api-generator/components/dropdown.js +++ b/api-generator/components/dropdown.js @@ -25,7 +25,7 @@ const DropdownProps = [ }, { name: "optionDisabled", - type: "boolean", + type: "string | function", default: "null", description: "Property name or getter function to use as the disabled flag of an option, defaults to false when not defined." }, diff --git a/api-generator/components/listbox.js b/api-generator/components/listbox.js index 1acb702977..6eb9e46672 100644 --- a/api-generator/components/listbox.js +++ b/api-generator/components/listbox.js @@ -25,7 +25,7 @@ const ListboxProps = [ }, { name: "optionDisabled", - type: "boolean", + type: "string | function", default: "null", description: "Property name or getter function to use as the disabled flag of an option, defaults to false when not defined." }, diff --git a/api-generator/components/multiselect.js b/api-generator/components/multiselect.js index 64590708dd..ad17f098b2 100644 --- a/api-generator/components/multiselect.js +++ b/api-generator/components/multiselect.js @@ -25,7 +25,7 @@ const MultiSelectProps = [ }, { name: "optionDisabled", - type: "boolean", + type: "string | function", default: "null", description: "Property name or getter function to use as the disabled flag of an option, defaults to false when not defined." }, diff --git a/src/components/dropdown/Dropdown.d.ts b/src/components/dropdown/Dropdown.d.ts index f3f0519ac5..c92b3013c4 100755 --- a/src/components/dropdown/Dropdown.d.ts +++ b/src/components/dropdown/Dropdown.d.ts @@ -5,7 +5,7 @@ declare class Dropdown extends Vue { options?: any[]; optionLabel?: string; optionValue?: any; - optionDisabled?: boolean; + optionDisabled?: string | ((data: any) => boolean) | undefined; scrollHeight?: string; filter?: boolean; filterPlaceholder?: string; diff --git a/src/components/listbox/Listbox.d.ts b/src/components/listbox/Listbox.d.ts index 4052df5c6d..d5773cc035 100755 --- a/src/components/listbox/Listbox.d.ts +++ b/src/components/listbox/Listbox.d.ts @@ -5,7 +5,7 @@ declare class Listbox extends Vue { options?: any[]; optionLabel?: string; optionValue?: any; - optionDisabled?: boolean; + optionDisabled?: string | ((data: any) => boolean) | undefined; listStyle?: string; disabled?: boolean; dataKey?: string; diff --git a/src/components/multiselect/MultiSelect.d.ts b/src/components/multiselect/MultiSelect.d.ts index 7d51611b63..e7181e5e4a 100755 --- a/src/components/multiselect/MultiSelect.d.ts +++ b/src/components/multiselect/MultiSelect.d.ts @@ -5,7 +5,7 @@ declare class MultiSelect extends Vue { options?: any[]; optionLabel?: string; optionValue?: any; - optionDisabled?: boolean; + optionDisabled?: string | ((data: any) => boolean) | undefined; scrollHeight?: string; placeholder?: string; disabled?: boolean; diff --git a/src/views/dropdown/DropdownDoc.vue b/src/views/dropdown/DropdownDoc.vue index 46f12efd51..7130c5024f 100755 --- a/src/views/dropdown/DropdownDoc.vue +++ b/src/views/dropdown/DropdownDoc.vue @@ -102,7 +102,7 @@ data() { 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 34133a74cb..0509273f74 100755 --- a/src/views/listbox/ListboxDoc.vue +++ b/src/views/listbox/ListboxDoc.vue @@ -96,7 +96,7 @@ data() { 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 7e660637b1..1063bd57e8 100755 --- a/src/views/multiselect/MultiSelectDoc.vue +++ b/src/views/multiselect/MultiSelectDoc.vue @@ -108,7 +108,7 @@ data() { 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.