Skip to content

Commit

Permalink
Fixed #1705 - optionDisabled prop on Dropdown wrongly typed
Browse files Browse the repository at this point in the history
  • Loading branch information
cagataycivici committed Nov 17, 2021
1 parent 91635f7 commit 5a91e00
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 8 deletions.
4 changes: 3 additions & 1 deletion src/components/dropdown/Dropdown.d.ts
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
4 changes: 3 additions & 1 deletion src/components/listbox/Listbox.d.ts
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
4 changes: 3 additions & 1 deletion src/components/multiselect/MultiSelect.d.ts
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
4 changes: 3 additions & 1 deletion src/components/selectbutton/SelectButton.d.ts
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/views/dropdown/DropdownDoc.vue
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ export default {
</tr>
<tr>
<td>optionDisabled</td>
<td>boolean</td>
<td>string | function</td>
<td>null</td>
<td>Property name or getter function to use as the disabled flag of an option, defaults to false when not defined.</td>
</tr>
Expand Down
2 changes: 1 addition & 1 deletion src/views/listbox/ListboxDoc.vue
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ export default {
</tr>
<tr>
<td>optionDisabled</td>
<td>boolean</td>
<td>string | function</td>
<td>null</td>
<td>Property name or getter function to use as the disabled flag of an option, defaults to false when not defined.</td>
</tr>
Expand Down
2 changes: 1 addition & 1 deletion src/views/multiselect/MultiSelectDoc.vue
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ export default {
</tr>
<tr>
<td>optionDisabled</td>
<td>boolean</td>
<td>string | function</td>
<td>null</td>
<td>Property name or getter function to use as the disabled flag of an option, defaults to false when not defined.</td>
</tr>
Expand Down
2 changes: 1 addition & 1 deletion src/views/selectbutton/SelectButtonDoc.vue
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ export default {
</tr>
<tr>
<td>optionDisabled</td>
<td>boolean</td>
<td>string | function</td>
<td>null</td>
<td>Property name or getter function to use as the disabled flag of an option, defaults to false when not defined.</td>
</tr>
Expand Down

0 comments on commit 5a91e00

Please sign in to comment.