Skip to content

Commit

Permalink
fix: select vmodel prop type (#616)
Browse files Browse the repository at this point in the history
  • Loading branch information
mlmoravek authored Oct 7, 2023
1 parent b35c339 commit 60f67c5
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 15 deletions.
16 changes: 8 additions & 8 deletions packages/docs-next/components/Select.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,14 @@ title: Select

### Events

| Event name | Properties | Description |
| ----------------- | ------------------------------------------------------------------------------- | ------------------------------- |
| update:modelValue | **value** ` [String, Number, Boolean, Object, Array]` - updated modelValue prop | modelValue prop two-way binding |
| focus | **event** `Event` - native event | on input focus event |
| blur | **event** `Event` - native event | on input blur event |
| invalid | **event** `Event` - native event | on input invalid event |
| icon-click | **event** `Event` - native event | on icon click event |
| icon-right-click | **event** `Event` - native event | on icon right click event |
| Event name | Properties | Description |
| ----------------- | ----------------------------------------------------------------------------------------------- | ------------------------------- |
| update:modelValue | **value** `string \| number \| boolean \| object \| Array<any>` - updated modelValue prop | modelValue prop two-way binding |
| focus | **event** `Event` - native event | on input focus event |
| blur | **event** `Event` - native event | on input blur event |
| invalid | **event** `Event` - native event | on input invalid event |
| icon-click | **event** `Event` - native event | on icon click event |
| icon-right-click | **event** `Event` - native event | on icon right click event |

### Slots

Expand Down
12 changes: 5 additions & 7 deletions packages/oruga-next/src/components/select/Select.vue
Original file line number Diff line number Diff line change
Expand Up @@ -124,11 +124,11 @@ const props = defineProps({
const emits = defineEmits<{
/**
* modelValue prop two-way binding
* @param value { [String, Number, Boolean, Object, Array]} updated modelValue prop
* @param value {string | number | boolean | object | Array<any>} updated modelValue prop
*/
(
e: "update:modelValue",
value: [string, number, boolean, object, Array<any>],
value: string | number | boolean | object | Array<any>,
): void;
/**
* on input focus event
Expand Down Expand Up @@ -166,11 +166,9 @@ const { checkHtml5Validity, onBlur, onFocus, onInvalid, setFocus } =
// inject parent field component if used inside one
const { parentField, statusVariant, statusVariantIcon } = injectField();
const vmodel = useVModelBinding<[string, number, boolean, object, Array<any>]>(
props,
emits,
{ passive: true },
);
const vmodel = useVModelBinding<
string | number | boolean | object | Array<any>
>(props, emits, { passive: true });
const placeholderVisible = computed(() => vmodel.value === null);
Expand Down

0 comments on commit 60f67c5

Please sign in to comment.