You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: latest/markdowns/Select.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -339,7 +339,7 @@ type: example
339
339
340
340
#### Highlighting and selecting options
341
341
342
-
To mark an option as "highlighted", use the option's `isHighlighted` prop. Note that only one highlighted option is permitted. Similarly, use `isSelected` to mark an option or multiple options as "selected". When allowing multiple selections, it's best to render a [Tag](Tag) with [AccessibleContent](AccessibleContent) for each selected option via the `renderBeforeInput` prop.
342
+
To mark an option as "highlighted", use the option's `isHighlighted` prop. Note that only one highlighted option is permitted. Similarly, use `isSelected` to mark an option or multiple options as "selected". When allowing multiple selections, it's best to render a [Tag](Tag) with [AccessibleContent](AccessibleContent) for each selected option via the `renderBeforeInput` prop. Set `renderBeforeInputElementGap="even"` so wrapped tags are evenly spaced even as they wrap to multiple rows.
343
343
344
344
> **Accessibility:** set an explicit `aria-label` on the `Select` (matching `renderLabel`) and list the selected options in the `assistiveText` (e.g. `"Alaska Selected, …"`), as the example below does. This keeps the combobox's accessible name limited to the field label, while screen reader users still hear which options are selected. Each pill's `"Remove …"` label is only announced when that pill receives focus.
345
345
@@ -490,9 +490,6 @@ type: example
490
490
{getOptionById(id).label}
491
491
</AccessibleContent>
492
492
}
493
-
margin={
494
-
index >0?'xxx-small xx-small xxx-small 0':'0 xx-small 0 0'
| Select | renderBeforeInput | `Renderable` | No | - | Content to display before the text input. This will commonly be an icon or tags to show multiple selections. |
1320
1319
| Select | renderAfterInput | `Renderable` | No | - | Content to display after the text input. This content will replace the default arrow icons. |
1321
1320
| Select | shouldNotWrap | `boolean` | No | `false` | Prevents the default behavior of wrapping the input and rendered content when available space is exceeded. |
1321
+
| Select | renderBeforeInputElementGap | `'default' \|'even'` | No | - | Whether to apply a gap between the elements rendered via `renderBeforeInput` (a CSS flex container), e.g. tags. - `'default'`: no gap is applied between the elements. - `'even'`: wrapped rows are evenly spaced with a vertical and horizontal gap. |
1322
1322
| Select | layout | `'stacked' \|'inline'` | No | - | In `stacked` mode the input is below the label. In `inline` mode the input is to the right/left (depending on text direction) of the label, and the layout will look like `stacked` for small screens. |
1323
1323
| Select | placement | `PlacementPropValues` | No | `'bottom stretch'` | The placement of the options list. |
1324
1324
| Select | constrain | `PositionConstraint` | No | `'window'` | The parent in which to constrain the placement. |
| TextInput | htmlSize |`number`| No | - | The width of the input (integer value 0 or higher), if a width is not explicitly provided via the `width` prop. Only applicable if `display="inline-block"`. For more see https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/size|
366
365
| TextInput | display |`'inline-block' \| 'block'`| No |`'block'`| The display of the root element. |
367
366
| TextInput | shouldNotWrap |`boolean`| No |`false`| Prevents the default behavior of wrapping the input and rendered content when available space is exceeded. |
367
+
| TextInput | renderBeforeInputElementGap |`'default' \| 'even'`| No |`'default'`| Whether to apply a gap between the elements rendered via `renderBeforeInput` (a CSS flex container), e.g. tags. - `'default'`: no gap is applied between the elements. - `'even'`: wrapped rows are evenly spaced with a vertical and horizontal gap. |
368
368
| TextInput | placeholder |`string`| No | - | Html placeholder text to display when the input has no value. This should be hint text, not a label replacement. |
369
369
| TextInput | isRequired |`boolean`| No |`false`| Whether or not the text input is required. |
370
370
| TextInput | elementRef |`(element: Element \| null) => void`| No | - | provides a reference to the underlying html root element |
0 commit comments