diff --git a/.changeset/four-elephants-wait.md b/.changeset/four-elephants-wait.md new file mode 100644 index 0000000000..4ad347aba7 --- /dev/null +++ b/.changeset/four-elephants-wait.md @@ -0,0 +1,5 @@ +--- +'@storefront-ui/vue': patch +--- + +Correct usage of `v-model` in SfSelect diff --git a/apps/docs/components/components/select.md b/apps/docs/components/components/select.md index 95802aa862..3de78a9342 100644 --- a/apps/docs/components/components/select.md +++ b/apps/docs/components/components/select.md @@ -26,6 +26,7 @@ If you need to make this field required, it is crucial to communicate this inten <<<../../preview/next/pages/showcases/Select/SelectSizes.tsx#source + ### Custom chevron @@ -40,6 +41,7 @@ You can replace the default chevron with your own custom content by using the <<<../../preview/next/pages/showcases/Select/SelectCustomChevron.tsx#source + ### Invalid state @@ -54,15 +56,15 @@ You can replace the default chevron with your own custom content by using the <<<../../preview/next/pages/showcases/Select/SelectInvalid.tsx#source + ## Notes -All non-prop attributes and styles added to `SfSelect` component are passed directly to native input element. This means that you can add all of the input attributes directly to `SfSelect`. If you want to style the wrapper `div`, you can pass your classes via the `wrapperClassName` prop. +All non-prop attributes and styles added to `SfSelect` component are passed directly to native input element. This means that you can add all of the input attributes directly to `SfSelect`. If you want to style the wrapper `div`, you can pass your classes via the `wrapperClassName` prop. If you only have a few options, consider using the [`Radio`](radio.html) component instead of `Select`. - ## Accessibility notes Since this component uses the native `` element, it inherits its accessi ## Props -| Prop name | Type | Default value | Possible values | -| ---------------- | -------- | ------------- | -------------------------------------- | -| `value` | `string` | | | -| `size` | `SfSelectSize` | `'base'` | `'sm'`, `'base'`,`'lg'` | -| `disabled` | `boolean` | `false` | | -| `invalid` | `boolean` | `false` | | -| `required` | `boolean` | `false` | | -| `placeholder` | `string` | | | -| `wrapperClassName` | `string` | | | +| Prop name | Type | Default value | Possible values | +| ------------------- | ----------------- | ------------- | -------------------------------------- | + +| `modelValue` | `boolean | string[]` | | | + + +| `value` | `string` | | | + +| `size` | `SfSelectSize` | `'base'` | `'sm'`, `'base'`,`'lg'` | +| `disabled` | `boolean` | `false` | | +| `invalid` | `boolean` | `false` | | +| `required` | `boolean` | `false` | | +| `placeholder` | `string` | | | +| `wrapperClassName` | `string` | | | | `onChange` | `Function` | | | | `slotChevron` | `ReactNode` | | | @@ -112,6 +119,7 @@ Since this component uses the native `` element, it inherits its accessi <<< ../../../packages/sfui/frameworks/react/components/SfSelect/SfSelect.tsx + ::: diff --git a/apps/preview/nuxt/pages/showcases/Filters/Category.vue b/apps/preview/nuxt/pages/showcases/Filters/Category.vue index d833fb0dc1..049fb572a2 100644 --- a/apps/preview/nuxt/pages/showcases/Filters/Category.vue +++ b/apps/preview/nuxt/pages/showcases/Filters/Category.vue @@ -17,7 +17,7 @@
  • + > + +

    {{ label }} diff --git a/apps/preview/nuxt/pages/showcases/Filters/FiltersSidepanel.vue b/apps/preview/nuxt/pages/showcases/Filters/FiltersSidepanel.vue index 99a0c7f380..c545ee1887 100644 --- a/apps/preview/nuxt/pages/showcases/Filters/FiltersSidepanel.vue +++ b/apps/preview/nuxt/pages/showcases/Filters/FiltersSidepanel.vue @@ -41,7 +41,7 @@