From e55151993e9b5aea8829db94dc19f71522690e2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Gr=C3=A9lard?= Date: Wed, 11 May 2022 20:17:59 +0100 Subject: [PATCH] Document latest menu/select updates (#387) * Document latest menu/select updates * Update 0.1.2.mdx * Update 0.1.2.mdx * Update 0.1.2.mdx --- data/primitives/components/select/0.1.2.mdx | 14 +++++++++++++- data/primitives/overview/releases.mdx | 6 ++++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/data/primitives/components/select/0.1.2.mdx b/data/primitives/components/select/0.1.2.mdx index d49ad3787..2fb20b00e 100644 --- a/data/primitives/components/select/0.1.2.mdx +++ b/data/primitives/components/select/0.1.2.mdx @@ -25,6 +25,7 @@ aria: https://www.w3.org/TR/wai-aria-practices-1.2/#Listbox 'Supports items, labels, groups of items.', 'Focus is fully managed.', 'Full keyboard navigation.', + 'Supports custom placeholder.', 'Typeahead support.', 'Supports Right to Left direction.', ]} @@ -176,7 +177,7 @@ The button that toggles the select. The `Select.Content` will position itself by ### Value -The part that reflects the selected value. By default the selected item's text will be rendered. if you require more control, you can instead control the select and pass your own `children`. It should not be styled to ensure correct positioning. +The part that reflects the selected value. By default the selected item's text will be rendered. if you require more control, you can instead control the select and pass your own `children`. It should not be styled to ensure correct positioning. An optional `placeholder` prop is also available for when the select has no value. + The content that will be rendered inside the Select.Value{' '} + when no value or defaultValue is set. + + ), + }, ]} /> diff --git a/data/primitives/overview/releases.mdx b/data/primitives/overview/releases.mdx index 333bb20f2..b5369eb70 100644 --- a/data/primitives/overview/releases.mdx +++ b/data/primitives/overview/releases.mdx @@ -32,6 +32,10 @@ metaDescription: Radix Primitives releases and their changelogs. - Fix position breaking when using `asChild` on `Select.Content` - Improve trigger/content alignment when `Select.Content` has padding - Fix trigger/content alignment when there are less than 5 items +- Support trigger/content alignment when no value is provided +- Add `data-highlighted` attribute to support styling +- [**Breaking**] Renamed `data-state` values from `active|inactive` to `checked|unchecked` +- Add support for placeholder via `placeholder` prop on `Select.Value` @@ -72,6 +76,7 @@ This release introduces 3 brand new primitives: [`Select`](../components/select) - Prevent `DropdownMenu.TriggerItem` click from firing twice - Improve idle performance +- Add `data-highlighted` attribute to support styling @@ -84,6 +89,7 @@ This release introduces 3 brand new primitives: [`Select`](../components/select) - Prevent clicking trigger to close from immediately reopening in non-modal mode - Prevent `DropdownMenu.TriggerItem` click from firing twice - Improve idle performance +- Add `data-highlighted` attribute to support styling