@mackin.com/styleguide 9.6.2 → 9.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.d.ts +2 -0
- package/index.js +2 -1
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -51,6 +51,8 @@ interface AutocompleteProps extends BaseInputProps$1 {
|
|
|
51
51
|
allowScroll?: boolean;
|
|
52
52
|
/** Delay before the input is re-focused after picking a value. Adjust if there are issues with the displayed input value after pick. Defaults to 100ms. */
|
|
53
53
|
onPickFocusWaitMs?: number;
|
|
54
|
+
/** The option `title` attribute will be filled with the option text. Defaults to `true`. */
|
|
55
|
+
showOptionTextAsTitle?: boolean;
|
|
54
56
|
onPick: (value: string | undefined, index?: number) => void;
|
|
55
57
|
}
|
|
56
58
|
declare const Autocomplete: (p: AutocompleteProps) => JSX.Element;
|
package/index.js
CHANGED
|
@@ -1082,8 +1082,9 @@ const Autocomplete = (p) => {
|
|
|
1082
1082
|
maxHeight: `calc(${theme.controls.height} * ${maxShowValues})`
|
|
1083
1083
|
}), p.listClassName) },
|
|
1084
1084
|
displayOptions.map((v, listItemIndex) => {
|
|
1085
|
+
var _a;
|
|
1085
1086
|
return (React__namespace.createElement(ListItem, { key: v, variant: "full", className: p.listItemClassName },
|
|
1086
|
-
React__namespace.createElement(Button, { onKeyDown: e => {
|
|
1087
|
+
React__namespace.createElement(Button, { title: ((_a = p.showOptionTextAsTitle) !== null && _a !== void 0 ? _a : true) ? v : undefined, onKeyDown: e => {
|
|
1087
1088
|
var _a, _b;
|
|
1088
1089
|
if (e.key === 'ArrowDown') {
|
|
1089
1090
|
e.stopPropagation();
|