downshift 8.0.0 → 8.0.2
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/dist/downshift.cjs.js +2 -4
- package/dist/downshift.esm.js +2 -4
- package/dist/downshift.native.cjs.js +2 -4
- package/dist/downshift.nativeweb.cjs.js +2 -4
- package/dist/downshift.umd.js +2 -4
- package/dist/downshift.umd.js.map +1 -1
- package/dist/downshift.umd.min.js +1 -1
- package/dist/downshift.umd.min.js.map +1 -1
- package/package.json +1 -2
- package/preact/dist/downshift.cjs.js +2 -4
- package/preact/dist/downshift.esm.js +2 -4
- package/preact/dist/downshift.umd.js +2 -4
- package/preact/dist/downshift.umd.js.map +1 -1
- package/preact/dist/downshift.umd.min.js +1 -1
- package/preact/dist/downshift.umd.min.js.map +1 -1
- package/typings/index.d.ts +2 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "downshift",
|
|
3
|
-
"version": "8.0.
|
|
3
|
+
"version": "8.0.2",
|
|
4
4
|
"description": "🏎 A set of primitives to build simple, flexible, WAI-ARIA compliant React autocomplete, combobox or select dropdown components.",
|
|
5
5
|
"main": "dist/downshift.cjs.js",
|
|
6
6
|
"react-native": "dist/downshift.native.cjs.js",
|
|
@@ -95,7 +95,6 @@
|
|
|
95
95
|
"@testing-library/user-event": "^14.4.3",
|
|
96
96
|
"@types/jest": "^26.0.24",
|
|
97
97
|
"@types/react": "^17.0.15",
|
|
98
|
-
"@types/react-native": "^0.71.3",
|
|
99
98
|
"@typescript-eslint/eslint-plugin": "^4.28.5",
|
|
100
99
|
"@typescript-eslint/parser": "^4.28.5",
|
|
101
100
|
"babel-plugin-macros": "^3.1.0",
|
|
@@ -2933,9 +2933,7 @@ function useCombobox(userProps) {
|
|
|
2933
2933
|
validatePropTypes$1(userProps, useCombobox);
|
|
2934
2934
|
// Props defaults and destructuring.
|
|
2935
2935
|
var props = _extends__default["default"]({}, defaultProps$1, userProps);
|
|
2936
|
-
var
|
|
2937
|
-
defaultIsOpen = props.defaultIsOpen,
|
|
2938
|
-
items = props.items,
|
|
2936
|
+
var items = props.items,
|
|
2939
2937
|
scrollIntoView = props.scrollIntoView,
|
|
2940
2938
|
environment = props.environment,
|
|
2941
2939
|
getA11yStatusMessage = props.getA11yStatusMessage,
|
|
@@ -3003,7 +3001,7 @@ function useCombobox(userProps) {
|
|
|
3003
3001
|
});
|
|
3004
3002
|
// Focus the input on first render if required.
|
|
3005
3003
|
React.useEffect(function () {
|
|
3006
|
-
var focusOnOpen =
|
|
3004
|
+
var focusOnOpen = getInitialValue$1(props, 'isOpen');
|
|
3007
3005
|
if (focusOnOpen && inputRef.current) {
|
|
3008
3006
|
inputRef.current.focus();
|
|
3009
3007
|
}
|
|
@@ -2919,9 +2919,7 @@ function useCombobox(userProps) {
|
|
|
2919
2919
|
validatePropTypes$1(userProps, useCombobox);
|
|
2920
2920
|
// Props defaults and destructuring.
|
|
2921
2921
|
var props = _extends({}, defaultProps$1, userProps);
|
|
2922
|
-
var
|
|
2923
|
-
defaultIsOpen = props.defaultIsOpen,
|
|
2924
|
-
items = props.items,
|
|
2922
|
+
var items = props.items,
|
|
2925
2923
|
scrollIntoView = props.scrollIntoView,
|
|
2926
2924
|
environment = props.environment,
|
|
2927
2925
|
getA11yStatusMessage = props.getA11yStatusMessage,
|
|
@@ -2989,7 +2987,7 @@ function useCombobox(userProps) {
|
|
|
2989
2987
|
});
|
|
2990
2988
|
// Focus the input on first render if required.
|
|
2991
2989
|
useEffect(function () {
|
|
2992
|
-
var focusOnOpen =
|
|
2990
|
+
var focusOnOpen = getInitialValue$1(props, 'isOpen');
|
|
2993
2991
|
if (focusOnOpen && inputRef.current) {
|
|
2994
2992
|
inputRef.current.focus();
|
|
2995
2993
|
}
|
|
@@ -3234,9 +3234,7 @@
|
|
|
3234
3234
|
validatePropTypes$1(userProps, useCombobox);
|
|
3235
3235
|
// Props defaults and destructuring.
|
|
3236
3236
|
var props = _extends({}, defaultProps$1, userProps);
|
|
3237
|
-
var
|
|
3238
|
-
defaultIsOpen = props.defaultIsOpen,
|
|
3239
|
-
items = props.items,
|
|
3237
|
+
var items = props.items,
|
|
3240
3238
|
scrollIntoView = props.scrollIntoView,
|
|
3241
3239
|
environment = props.environment,
|
|
3242
3240
|
getA11yStatusMessage = props.getA11yStatusMessage,
|
|
@@ -3304,7 +3302,7 @@
|
|
|
3304
3302
|
});
|
|
3305
3303
|
// Focus the input on first render if required.
|
|
3306
3304
|
React.useEffect(function () {
|
|
3307
|
-
var focusOnOpen =
|
|
3305
|
+
var focusOnOpen = getInitialValue$1(props, 'isOpen');
|
|
3308
3306
|
if (focusOnOpen && inputRef.current) {
|
|
3309
3307
|
inputRef.current.focus();
|
|
3310
3308
|
}
|