@legendapp/list 3.3.10 → 3.3.11
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 +9 -0
- package/keyboard.d.ts +1 -1
- package/keyboard.js +2 -4
- package/keyboard.mjs +2 -4
- package/package.json +1 -1
- package/react-native.js +536 -477
- package/react-native.mjs +536 -477
- package/react-native.web.d.ts +1 -0
- package/react-native.web.js +350 -259
- package/react-native.web.mjs +350 -259
- package/react.d.ts +1 -0
- package/react.js +350 -259
- package/react.mjs +350 -259
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
## 3.3.11
|
|
2
|
+
|
|
3
|
+
- Fix: `scrollToEnd` and `maintainScrollAtEnd` keep reaching the end as content changes, while scrolling away or requesting another position cancels automatic following.
|
|
4
|
+
- Fix: Switching datasets cancels old scroll requests so they cannot override the new dataset's initial position.
|
|
5
|
+
- Fix: `anchoredEndSpace` shrinks excess blank space as rows are measured instead of waiting for every remaining row.
|
|
6
|
+
- Fix: Resizing the chat composer preserves the combined keyboard and composer spacing.
|
|
7
|
+
- Fix: Web scroll adjustments no longer leave extra padding at the end of the list.
|
|
8
|
+
- Fix: Web row reordering happens sooner when idle and preserves focus, animations, and embedded content state in browsers that support state-preserving moves.
|
|
9
|
+
|
|
1
10
|
## 3.3.10
|
|
2
11
|
|
|
3
12
|
- Fix: Changing `dataKey` no longer loses the new dataset's initial scroll position when React retries a render.
|
package/keyboard.d.ts
CHANGED
|
@@ -281,7 +281,7 @@ type KeyboardChatComposerInsetListRef = {
|
|
|
281
281
|
type KeyboardChatComposerRef = {
|
|
282
282
|
current: Pick<View, "measure"> | null;
|
|
283
283
|
};
|
|
284
|
-
declare function useKeyboardChatComposerInset(
|
|
284
|
+
declare function useKeyboardChatComposerInset(_listRef: KeyboardChatComposerInsetListRef, composerRef: KeyboardChatComposerRef, initialHeight?: number): {
|
|
285
285
|
contentInsetEndAdjustment: SharedValue<number>;
|
|
286
286
|
onComposerLayout: (event: LayoutChangeEvent) => void;
|
|
287
287
|
};
|
package/keyboard.js
CHANGED
|
@@ -33,19 +33,17 @@ if (typeof __DEV__ !== "undefined" && __DEV__ && !reactNativeKeyboardController.
|
|
|
33
33
|
"[legend-list] KeyboardAwareLegendList requires a recent react-native-keyboard-controller with KeyboardChatScrollView. Please upgrade react-native-keyboard-controller to at least 1.21.7."
|
|
34
34
|
);
|
|
35
35
|
}
|
|
36
|
-
function useKeyboardChatComposerInset(
|
|
36
|
+
function useKeyboardChatComposerInset(_listRef, composerRef, initialHeight = 0) {
|
|
37
37
|
const contentInsetEndAdjustment = reactNativeReanimated.useSharedValue(initialHeight);
|
|
38
38
|
const lastHeightRef = React.useRef(void 0);
|
|
39
39
|
const reportHeight = React.useCallback(
|
|
40
40
|
(height) => {
|
|
41
|
-
var _a;
|
|
42
41
|
if (Number.isFinite(height) && height !== lastHeightRef.current) {
|
|
43
42
|
lastHeightRef.current = height;
|
|
44
43
|
contentInsetEndAdjustment.value = height;
|
|
45
|
-
(_a = listRef.current) == null ? void 0 : _a.reportContentInset({ bottom: height });
|
|
46
44
|
}
|
|
47
45
|
},
|
|
48
|
-
[contentInsetEndAdjustment
|
|
46
|
+
[contentInsetEndAdjustment]
|
|
49
47
|
);
|
|
50
48
|
React.useLayoutEffect(() => {
|
|
51
49
|
var _a;
|
package/keyboard.mjs
CHANGED
|
@@ -12,19 +12,17 @@ if (typeof __DEV__ !== "undefined" && __DEV__ && !KeyboardChatScrollView) {
|
|
|
12
12
|
"[legend-list] KeyboardAwareLegendList requires a recent react-native-keyboard-controller with KeyboardChatScrollView. Please upgrade react-native-keyboard-controller to at least 1.21.7."
|
|
13
13
|
);
|
|
14
14
|
}
|
|
15
|
-
function useKeyboardChatComposerInset(
|
|
15
|
+
function useKeyboardChatComposerInset(_listRef, composerRef, initialHeight = 0) {
|
|
16
16
|
const contentInsetEndAdjustment = useSharedValue(initialHeight);
|
|
17
17
|
const lastHeightRef = useRef(void 0);
|
|
18
18
|
const reportHeight = useCallback(
|
|
19
19
|
(height) => {
|
|
20
|
-
var _a;
|
|
21
20
|
if (Number.isFinite(height) && height !== lastHeightRef.current) {
|
|
22
21
|
lastHeightRef.current = height;
|
|
23
22
|
contentInsetEndAdjustment.value = height;
|
|
24
|
-
(_a = listRef.current) == null ? void 0 : _a.reportContentInset({ bottom: height });
|
|
25
23
|
}
|
|
26
24
|
},
|
|
27
|
-
[contentInsetEndAdjustment
|
|
25
|
+
[contentInsetEndAdjustment]
|
|
28
26
|
);
|
|
29
27
|
useLayoutEffect(() => {
|
|
30
28
|
var _a;
|
package/package.json
CHANGED