Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions docs/content/docs/2.components/select-menu.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,10 @@ props:
Unlike the [`Select`](/docs/components/select) component, the SelectMenu expects the whole object to be passed to the `v-model` directive or the `default-value` prop by default.
::

You can also pass an array of arrays to the `items` prop to display separated groups of items.
### Grouped Items
You can pass an array of arrays to the `items` prop to display separated groups of items.

Use the label property to name each group heading.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟑 Minor | ⚑ Quick win

Clarify that group headings require type: 'label', not only label.

The sentence currently implies label alone defines a group heading, but your own example uses type: label plus label. Please make that explicit to avoid misuse.

✍️ Suggested doc tweak
-Use the label property to name each group heading.
+Use an item with `type: 'label'` and the `label` property to define each group heading.
πŸ“ Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
Use the label property to name each group heading.
Use an item with `type: 'label'` and the `label` property to define each group heading.
πŸ€– Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/content/docs/2.components/select-menu.md` at line 116, The sentence "Use
the label property to name each group heading." is misleading; update the text
to explicitly state that group headings require both type: 'label' and a label
property (e.g., { type: 'label', label: 'My Group' }) so readers know to set
type: 'label' in the select menu group objects; mention the example uses both
and adjust wording to "Use type: 'label' together with the label property to
name each group heading" and/or add a short example showing { type: 'label',
label: '...' } to the Select Menu group documentation.


::component-code
---
Expand All @@ -125,12 +128,16 @@ external:
props:
modelValue: 'Apple'
items:
- - Apple
- - type: label
label: Fruits
- Apple
- Banana
- Blueberry
- Grapes
- Pineapple
- - Aubergine
- - type: label
label: Vegetables
- Aubergine
- Broccoli
- Carrot
- Courgette
Expand Down
Loading