diff --git a/snippets/Accordion.md b/snippets/Accordion.md index 3cea98a36..82a215d5b 100644 --- a/snippets/Accordion.md +++ b/snippets/Accordion.md @@ -8,7 +8,7 @@ Renders an accordion menu with multiple collapsible content elements. - Define an `AccordionItem` component, that renders a ` - + ); }; ``` diff --git a/snippets/Select.md b/snippets/Select.md index 9805f94d4..ff721085c 100644 --- a/snippets/Select.md +++ b/snippets/Select.md @@ -3,24 +3,23 @@ title: Select tags: components,input,beginner --- -Renders a `` element that uses a callback function to pass its value to the parent component. -- Use object destructuring to set defaults for certain attributes of the `` element with the appropriate attributes and use the `callback` function in the `onChange` event to pass the value of the textarea to the parent. -- Use the `selected` attribute to define the `defaultValue` of the `` element to set its initial value.. +- Use the `onChange` event to fire the `onValueChange` callback and send the new value to the parent. +- Use `Array.prototype.map()` on the `values` array to create an `