@hero-design/rn 8.139.0 → 8.139.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/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @hero-design/rn
|
|
2
2
|
|
|
3
|
+
## 8.139.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#5561](https://github.com/Thinkei/hero-design/pull/5561) [`6391a1e`](https://github.com/Thinkei/hero-design/commit/6391a1e82979b5f1089edf4c2360cdd7e442eb0e) Thanks [@vinhphan-eh](https://github.com/vinhphan-eh)! - [Select] Fix options list collapsing behind keyboard in nested BottomSheet
|
|
8
|
+
|
|
9
|
+
## 8.139.1
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [#5558](https://github.com/Thinkei/hero-design/pull/5558) [`5367a2d`](https://github.com/Thinkei/hero-design/commit/5367a2dfeefae084e70f5da9a35fa48fd007cb7a) Thanks [@vinhphan-eh](https://github.com/vinhphan-eh)! - [Select] Fix options list collapsing behind keyboard in nested BottomSheet
|
|
14
|
+
|
|
3
15
|
## 8.139.0
|
|
4
16
|
|
|
5
17
|
### Minor Changes
|
package/es/index.js
CHANGED
|
@@ -27908,13 +27908,13 @@ function MultiSelect(_ref) {
|
|
|
27908
27908
|
_ref$bottomSheetConfi = _ref.bottomSheetConfig,
|
|
27909
27909
|
bottomSheetConfig = _ref$bottomSheetConfi === void 0 ? {} : _ref$bottomSheetConfi,
|
|
27910
27910
|
assistiveInfoConfig = _ref.assistiveInfoConfig;
|
|
27911
|
-
var _useKeyboard = useKeyboard(),
|
|
27912
|
-
isKeyboardVisible = _useKeyboard.isKeyboardVisible,
|
|
27913
|
-
keyboardHeight = _useKeyboard.keyboardHeight;
|
|
27914
27911
|
var _useState = useState(false),
|
|
27915
27912
|
_useState2 = _slicedToArray(_useState, 2),
|
|
27916
27913
|
open = _useState2[0],
|
|
27917
27914
|
setOpen = _useState2[1];
|
|
27915
|
+
var _useKeyboard = useKeyboard(),
|
|
27916
|
+
isKeyboardVisible = _useKeyboard.isKeyboardVisible,
|
|
27917
|
+
keyboardHeight = _useKeyboard.keyboardHeight;
|
|
27918
27918
|
var _useState3 = useState(value),
|
|
27919
27919
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
27920
27920
|
selectingValue = _useState4[0],
|
|
@@ -27971,6 +27971,9 @@ function MultiSelect(_ref) {
|
|
|
27971
27971
|
style: {
|
|
27972
27972
|
paddingBottom: isKeyboardVisible ? keyboardHeight : 0
|
|
27973
27973
|
},
|
|
27974
|
+
keyboardAvoidingViewProps: {
|
|
27975
|
+
enabled: false
|
|
27976
|
+
},
|
|
27974
27977
|
footer: typeof footerLabel === 'string' ? /*#__PURE__*/React__default.createElement(Footer, {
|
|
27975
27978
|
label: footerLabel,
|
|
27976
27979
|
onPress: function onPress() {
|
|
@@ -28121,13 +28124,13 @@ var SingleSelect = function SingleSelect(_ref) {
|
|
|
28121
28124
|
_ref$bottomSheetConfi = _ref.bottomSheetConfig,
|
|
28122
28125
|
bottomSheetConfig = _ref$bottomSheetConfi === void 0 ? {} : _ref$bottomSheetConfi,
|
|
28123
28126
|
assistiveInfoConfig = _ref.assistiveInfoConfig;
|
|
28124
|
-
var _useKeyboard = useKeyboard(),
|
|
28125
|
-
isKeyboardVisible = _useKeyboard.isKeyboardVisible,
|
|
28126
|
-
keyboardHeight = _useKeyboard.keyboardHeight;
|
|
28127
28127
|
var _useState = useState(false),
|
|
28128
28128
|
_useState2 = _slicedToArray(_useState, 2),
|
|
28129
28129
|
open = _useState2[0],
|
|
28130
28130
|
setOpen = _useState2[1];
|
|
28131
|
+
var _useKeyboard = useKeyboard(),
|
|
28132
|
+
isKeyboardVisible = _useKeyboard.isKeyboardVisible,
|
|
28133
|
+
keyboardHeight = _useKeyboard.keyboardHeight;
|
|
28131
28134
|
var sectionListRef = useRef(null);
|
|
28132
28135
|
var sections = toSections(options);
|
|
28133
28136
|
var flatOptions = toFlatOptions(options);
|
|
@@ -28177,6 +28180,9 @@ var SingleSelect = function SingleSelect(_ref) {
|
|
|
28177
28180
|
style: {
|
|
28178
28181
|
paddingBottom: isKeyboardVisible ? keyboardHeight : 0
|
|
28179
28182
|
},
|
|
28183
|
+
keyboardAvoidingViewProps: {
|
|
28184
|
+
enabled: false
|
|
28185
|
+
},
|
|
28180
28186
|
onAnimationEnd: function onAnimationEnd() {
|
|
28181
28187
|
if (open === true) {
|
|
28182
28188
|
var _sectionListRef$curre;
|
package/lib/index.js
CHANGED
|
@@ -27937,13 +27937,13 @@ function MultiSelect(_ref) {
|
|
|
27937
27937
|
_ref$bottomSheetConfi = _ref.bottomSheetConfig,
|
|
27938
27938
|
bottomSheetConfig = _ref$bottomSheetConfi === void 0 ? {} : _ref$bottomSheetConfi,
|
|
27939
27939
|
assistiveInfoConfig = _ref.assistiveInfoConfig;
|
|
27940
|
-
var _useKeyboard = useKeyboard(),
|
|
27941
|
-
isKeyboardVisible = _useKeyboard.isKeyboardVisible,
|
|
27942
|
-
keyboardHeight = _useKeyboard.keyboardHeight;
|
|
27943
27940
|
var _useState = React.useState(false),
|
|
27944
27941
|
_useState2 = _slicedToArray(_useState, 2),
|
|
27945
27942
|
open = _useState2[0],
|
|
27946
27943
|
setOpen = _useState2[1];
|
|
27944
|
+
var _useKeyboard = useKeyboard(),
|
|
27945
|
+
isKeyboardVisible = _useKeyboard.isKeyboardVisible,
|
|
27946
|
+
keyboardHeight = _useKeyboard.keyboardHeight;
|
|
27947
27947
|
var _useState3 = React.useState(value),
|
|
27948
27948
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
27949
27949
|
selectingValue = _useState4[0],
|
|
@@ -28000,6 +28000,9 @@ function MultiSelect(_ref) {
|
|
|
28000
28000
|
style: {
|
|
28001
28001
|
paddingBottom: isKeyboardVisible ? keyboardHeight : 0
|
|
28002
28002
|
},
|
|
28003
|
+
keyboardAvoidingViewProps: {
|
|
28004
|
+
enabled: false
|
|
28005
|
+
},
|
|
28003
28006
|
footer: typeof footerLabel === 'string' ? /*#__PURE__*/React__namespace.default.createElement(Footer, {
|
|
28004
28007
|
label: footerLabel,
|
|
28005
28008
|
onPress: function onPress() {
|
|
@@ -28150,13 +28153,13 @@ var SingleSelect = function SingleSelect(_ref) {
|
|
|
28150
28153
|
_ref$bottomSheetConfi = _ref.bottomSheetConfig,
|
|
28151
28154
|
bottomSheetConfig = _ref$bottomSheetConfi === void 0 ? {} : _ref$bottomSheetConfi,
|
|
28152
28155
|
assistiveInfoConfig = _ref.assistiveInfoConfig;
|
|
28153
|
-
var _useKeyboard = useKeyboard(),
|
|
28154
|
-
isKeyboardVisible = _useKeyboard.isKeyboardVisible,
|
|
28155
|
-
keyboardHeight = _useKeyboard.keyboardHeight;
|
|
28156
28156
|
var _useState = React.useState(false),
|
|
28157
28157
|
_useState2 = _slicedToArray(_useState, 2),
|
|
28158
28158
|
open = _useState2[0],
|
|
28159
28159
|
setOpen = _useState2[1];
|
|
28160
|
+
var _useKeyboard = useKeyboard(),
|
|
28161
|
+
isKeyboardVisible = _useKeyboard.isKeyboardVisible,
|
|
28162
|
+
keyboardHeight = _useKeyboard.keyboardHeight;
|
|
28160
28163
|
var sectionListRef = React.useRef(null);
|
|
28161
28164
|
var sections = toSections(options);
|
|
28162
28165
|
var flatOptions = toFlatOptions(options);
|
|
@@ -28206,6 +28209,9 @@ var SingleSelect = function SingleSelect(_ref) {
|
|
|
28206
28209
|
style: {
|
|
28207
28210
|
paddingBottom: isKeyboardVisible ? keyboardHeight : 0
|
|
28208
28211
|
},
|
|
28212
|
+
keyboardAvoidingViewProps: {
|
|
28213
|
+
enabled: false
|
|
28214
|
+
},
|
|
28209
28215
|
onAnimationEnd: function onAnimationEnd() {
|
|
28210
28216
|
if (open === true) {
|
|
28211
28217
|
var _sectionListRef$curre;
|
package/package.json
CHANGED
|
@@ -4,12 +4,12 @@ import type {
|
|
|
4
4
|
SectionList,
|
|
5
5
|
} from 'react-native';
|
|
6
6
|
import { TouchableOpacity, View } from 'react-native';
|
|
7
|
-
import { useKeyboard } from '../../../utils/helpers';
|
|
8
7
|
import BottomSheet from '../../BottomSheet';
|
|
9
8
|
import Box from '../../Box';
|
|
10
9
|
import type { TextInputProps } from '../../TextInput';
|
|
11
10
|
import TextInput from '../../TextInput';
|
|
12
11
|
import Footer from '../Footer';
|
|
12
|
+
import { useKeyboard } from '../../../utils/helpers';
|
|
13
13
|
import { getScrollParams, toFlatOptions, toSections } from '../helpers';
|
|
14
14
|
import { StyledSearchBar } from '../StyledSelect';
|
|
15
15
|
import type { SectionType, SelectOptionType, SelectProps } from '../types';
|
|
@@ -77,8 +77,8 @@ function MultiSelect<V, T extends SelectOptionType<V>>({
|
|
|
77
77
|
bottomSheetConfig = {},
|
|
78
78
|
assistiveInfoConfig,
|
|
79
79
|
}: MultiSelectProps<V, T>) {
|
|
80
|
-
const { isKeyboardVisible, keyboardHeight } = useKeyboard();
|
|
81
80
|
const [open, setOpen] = useState(false);
|
|
81
|
+
const { isKeyboardVisible, keyboardHeight } = useKeyboard();
|
|
82
82
|
const [selectingValue, setSelectingValue] = useState(value);
|
|
83
83
|
const sectionListRef = useRef<SectionList<T, SectionType>>(null);
|
|
84
84
|
const sections = toSections(options);
|
|
@@ -147,9 +147,8 @@ function MultiSelect<V, T extends SelectOptionType<V>>({
|
|
|
147
147
|
setOpen(false);
|
|
148
148
|
}}
|
|
149
149
|
header={bottomSheetHeader || label}
|
|
150
|
-
style={{
|
|
151
|
-
|
|
152
|
-
}}
|
|
150
|
+
style={{ paddingBottom: isKeyboardVisible ? keyboardHeight : 0 }}
|
|
151
|
+
keyboardAvoidingViewProps={{ enabled: false }}
|
|
153
152
|
footer={
|
|
154
153
|
typeof footerLabel === 'string' ? (
|
|
155
154
|
<Footer
|
|
@@ -61,8 +61,8 @@ const SingleSelect = <V, T extends SelectOptionType<V>>({
|
|
|
61
61
|
bottomSheetConfig = {},
|
|
62
62
|
assistiveInfoConfig,
|
|
63
63
|
}: SingleSelectProps<V, T>) => {
|
|
64
|
-
const { isKeyboardVisible, keyboardHeight } = useKeyboard();
|
|
65
64
|
const [open, setOpen] = useState(false);
|
|
65
|
+
const { isKeyboardVisible, keyboardHeight } = useKeyboard();
|
|
66
66
|
const sectionListRef = useRef<SectionList<T, SectionType>>(null);
|
|
67
67
|
const sections = toSections(options);
|
|
68
68
|
const flatOptions = toFlatOptions(options);
|
|
@@ -130,9 +130,8 @@ const SingleSelect = <V, T extends SelectOptionType<V>>({
|
|
|
130
130
|
setOpen(false);
|
|
131
131
|
}}
|
|
132
132
|
header={bottomSheetHeader || label}
|
|
133
|
-
style={{
|
|
134
|
-
|
|
135
|
-
}}
|
|
133
|
+
style={{ paddingBottom: isKeyboardVisible ? keyboardHeight : 0 }}
|
|
134
|
+
keyboardAvoidingViewProps={{ enabled: false }}
|
|
136
135
|
onAnimationEnd={() => {
|
|
137
136
|
if (open === true) {
|
|
138
137
|
const scrollParams = getScrollParams(value, sections);
|