react-native-ui-lib 7.36.0-snapshot.6091 → 7.36.0-snapshot.6093
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/README.md
CHANGED
|
@@ -15,6 +15,13 @@
|
|
|
15
15
|
[](https://www.npmjs.com/package/react-native-ui-lib)
|
|
16
16
|
<a href="https://twitter.com/rnuilib"><img src="https://img.shields.io/twitter/follow/rnuilib.svg?style=flat&colorA=1DA1F2&colorB=20303C&label=Follow%20us%20on%20Twitter" alt="Follow on Twitter"></a>
|
|
17
17
|
|
|
18
|
+
## Notes
|
|
19
|
+
|
|
20
|
+
#### React Native New Arc
|
|
21
|
+
|
|
22
|
+
We are working on upgrading our UI Library to support the new React Native Architecture.
|
|
23
|
+
Currently, we support React Native 0.73, and we plan to support React Native 0.77 next.
|
|
24
|
+
While we don’t have a timeline yet, this is part of our roadmap.
|
|
18
25
|
|
|
19
26
|
## Links
|
|
20
27
|
- [Docs](https://wix.github.io/react-native-ui-lib/)
|
package/package.json
CHANGED
|
@@ -3,7 +3,6 @@ import { PickerProps, PickerValue, PickerSingleValue, PickerMultiValue } from '.
|
|
|
3
3
|
interface UsePickerSelectionProps extends Pick<PickerProps, 'migrate' | 'value' | 'onChange' | 'getItemValue' | 'topBarProps' | 'mode'> {
|
|
4
4
|
pickerExpandableRef: RefObject<any>;
|
|
5
5
|
setSearchValue: (searchValue: string) => void;
|
|
6
|
-
pickerRef: React.RefObject<any>;
|
|
7
6
|
}
|
|
8
7
|
declare const usePickerSelection: (props: UsePickerSelectionProps) => {
|
|
9
8
|
multiDraftValue: PickerMultiValue;
|
|
@@ -2,7 +2,6 @@ import _xor from "lodash/xor";
|
|
|
2
2
|
import _xorBy from "lodash/xorBy";
|
|
3
3
|
import { useCallback, useState, useEffect } from 'react';
|
|
4
4
|
import { PickerModes } from "../types";
|
|
5
|
-
import { AccessibilityInfo } from 'react-native';
|
|
6
5
|
const usePickerSelection = props => {
|
|
7
6
|
const {
|
|
8
7
|
migrate,
|
|
@@ -12,8 +11,7 @@ const usePickerSelection = props => {
|
|
|
12
11
|
pickerExpandableRef,
|
|
13
12
|
getItemValue,
|
|
14
13
|
setSearchValue,
|
|
15
|
-
mode
|
|
16
|
-
pickerRef
|
|
14
|
+
mode
|
|
17
15
|
} = props;
|
|
18
16
|
const [multiDraftValue, setMultiDraftValue] = useState(value);
|
|
19
17
|
const [multiFinalValue, setMultiFinalValue] = useState(value);
|
|
@@ -28,10 +26,6 @@ const usePickerSelection = props => {
|
|
|
28
26
|
setMultiFinalValue(item);
|
|
29
27
|
pickerExpandableRef.current?.closeExpandable?.();
|
|
30
28
|
onChange?.(item);
|
|
31
|
-
const reactTag = pickerRef.current.getNodeHandle();
|
|
32
|
-
if (reactTag) {
|
|
33
|
-
AccessibilityInfo.setAccessibilityFocus(reactTag);
|
|
34
|
-
}
|
|
35
29
|
}, [onChange]);
|
|
36
30
|
const toggleItemSelection = useCallback(item => {
|
|
37
31
|
let newValue;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { useContext, useImperativeHandle, useRef } from 'react';
|
|
2
|
-
import { findNodeHandle } from 'react-native';
|
|
3
2
|
import FieldContext from "./FieldContext";
|
|
4
3
|
const useImperativeInputHandle = (ref, props) => {
|
|
5
4
|
const inputRef = useRef();
|
|
@@ -20,11 +19,6 @@ const useImperativeInputHandle = (ref, props) => {
|
|
|
20
19
|
// Note: This returns field validity without actually validating it
|
|
21
20
|
isValid: () => {
|
|
22
21
|
return context.checkValidity();
|
|
23
|
-
},
|
|
24
|
-
getNodeHandle: () => {
|
|
25
|
-
if (inputRef.current) {
|
|
26
|
-
return findNodeHandle(inputRef.current);
|
|
27
|
-
}
|
|
28
22
|
}
|
|
29
23
|
};
|
|
30
24
|
});
|