@butternutbox/pawprint-native 1.3.0 → 1.3.1
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/.turbo/turbo-build.log +6 -6
- package/CHANGELOG.md +8 -0
- package/dist/index.cjs +11 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +11 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/__mocks__/react-native.tsx +2 -0
- package/src/components/molecules/SelectField/SelectField.test.tsx +18 -0
- package/src/components/molecules/SelectField/SelectField.tsx +12 -0
package/.turbo/turbo-build.log
CHANGED
|
@@ -7,12 +7,12 @@
|
|
|
7
7
|
[34mCJS[39m Build start
|
|
8
8
|
[34mESM[39m Build start
|
|
9
9
|
[34mDTS[39m Build start
|
|
10
|
-
[
|
|
11
|
-
[32mCJS[39m [1mdist/index.cjs.map [22m[32m1.10 MB[39m
|
|
12
|
-
[32mCJS[39m ⚡️ Build success in 6535ms
|
|
13
|
-
[32mESM[39m [1mdist/index.js [22m[32m533.47 KB[39m
|
|
10
|
+
[32mESM[39m [1mdist/index.js [22m[32m533.82 KB[39m
|
|
14
11
|
[32mESM[39m [1mdist/index.js.map [22m[32m1.10 MB[39m
|
|
15
|
-
[32mESM[39m ⚡️ Build success in
|
|
16
|
-
[
|
|
12
|
+
[32mESM[39m ⚡️ Build success in 8991ms
|
|
13
|
+
[32mCJS[39m [1mdist/index.cjs [22m[32m564.92 KB[39m
|
|
14
|
+
[32mCJS[39m [1mdist/index.cjs.map [22m[32m1.10 MB[39m
|
|
15
|
+
[32mCJS[39m ⚡️ Build success in 8993ms
|
|
16
|
+
[32mDTS[39m ⚡️ Build success in 22924ms
|
|
17
17
|
[32mDTS[39m [1mdist/index.d.cts [22m[32m111.87 KB[39m
|
|
18
18
|
[32mDTS[39m [1mdist/index.d.ts [22m[32m111.87 KB[39m
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @butternutbox/pawprint-native
|
|
2
2
|
|
|
3
|
+
## 1.3.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- fb1b99b: `SelectField`: stop a searchable field going dead before the user can type.
|
|
8
|
+
|
|
9
|
+
The Portal-cascade blur that follows the dropdown mounting can reach JS after both existing recoveries (the `keyboardDidShow` re-focus and the 100ms hardware-keyboard timer) have already run. React Native still counts the input as focused at that point, so the `keyboardDidShow` re-focus is a no-op, and once the blur lands nothing focuses it again: the soft keyboard hides and hardware key presses go nowhere. The search input now re-focuses itself when it blurs while the dropdown is still open.
|
|
10
|
+
|
|
3
11
|
## 1.3.0
|
|
4
12
|
|
|
5
13
|
### Minor Changes
|
package/dist/index.cjs
CHANGED
|
@@ -9159,6 +9159,16 @@ var SelectFieldRoot = React66__default.default.forwardRef(
|
|
|
9159
9159
|
keyboardSub.remove();
|
|
9160
9160
|
};
|
|
9161
9161
|
}, [isOpen, searchable, isSearching, searchQuery]);
|
|
9162
|
+
const isOpenRef = React66__default.default.useRef(isOpen);
|
|
9163
|
+
React66__default.default.useEffect(() => {
|
|
9164
|
+
isOpenRef.current = isOpen;
|
|
9165
|
+
});
|
|
9166
|
+
const handleSearchBlur = () => {
|
|
9167
|
+
setTimeout(() => {
|
|
9168
|
+
var _a2;
|
|
9169
|
+
if (isOpenRef.current) (_a2 = searchInputRef.current) == null ? void 0 : _a2.focus();
|
|
9170
|
+
}, 50);
|
|
9171
|
+
};
|
|
9162
9172
|
const isCompound = React66__default.default.Children.toArray(children).some(
|
|
9163
9173
|
(child) => React66__default.default.isValidElement(child) && child.type === SelectFieldContent
|
|
9164
9174
|
);
|
|
@@ -9249,6 +9259,7 @@ var SelectFieldRoot = React66__default.default.forwardRef(
|
|
|
9249
9259
|
ref: searchInputRef,
|
|
9250
9260
|
value: searchQuery,
|
|
9251
9261
|
onChangeText: setSearchQuery,
|
|
9262
|
+
onBlur: handleSearchBlur,
|
|
9252
9263
|
placeholder: searchPlaceholder != null ? searchPlaceholder : "Search...",
|
|
9253
9264
|
returnKeyType: "search",
|
|
9254
9265
|
clearButtonMode: "never",
|