diff options
author | Hailey <me@haileyok.com> | 2024-05-06 08:34:32 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-06 08:34:32 -0700 |
commit | bc070199114a4cf5971dea09c381ce84a2c78d5f (patch) | |
tree | 8dcbf8a4defb687cf587acea5801a4dfb5118f73 /src/view/com/util/List.tsx | |
parent | 594b40c3ae8d70e4a49148b4630cb2b78cd71a9b (diff) | |
download | voidsky-bc070199114a4cf5971dea09c381ce84a2c78d5f.tar.zst |
Further align web `List` with `FlatList`, add `contain` mode to web list implementation (#3867)
* add `onStartReached` to web list * fix `rootMargin` * Add `contain`, handle scroll events * improve types, fix typo * simplify * adjust `scrollToTop` and `scrollToOffset` to support `contain`, add `scrollToEnd` * rename `handleWindowScroll` to `handleScroll` * support basic `maintainVisibleContentPosition` * rename `contain` to `containWeb` * remove unnecessary `flex: 1` * add missing props * add root prop to `Visibility` * add root prop to `Visibility` * revert adding `maintainVisibleContentPosition` * oops * always apply `flex: 1` to styles when contained * add a contained list to storybook * make `onScroll` a worklet in storybook * revert test code * add scrolling to storybook * simplify getting scrollable node * nit: extra whitespace * nit: random comment * foolproof the logic * typecheck
Diffstat (limited to 'src/view/com/util/List.tsx')
-rw-r--r-- | src/view/com/util/List.tsx | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/view/com/util/List.tsx b/src/view/com/util/List.tsx index ff60e94cd..61dc5f81d 100644 --- a/src/view/com/util/List.tsx +++ b/src/view/com/util/List.tsx @@ -25,6 +25,7 @@ export type ListProps<ItemT> = Omit< headerOffset?: number refreshing?: boolean onRefresh?: () => void + containWeb?: boolean } export type ListRef = React.MutableRefObject<FlatList_INTERNAL | null> |