9.0.0 (2024-09-15)
Bug Fixes
- add isGliding back + interpolate scrollYCurrent only in iOS (80a5690)
- add missing
useCurrentTabScrollY
export (9cbca3b) - add missing hook dependency (#125) (d741e74)
- add missing tabbar style prop and improve typing (826966d), closes #64
- add null check (fb3b1b2)
- allow flatlist to bounce (f359f80)
- android (cae5325)
- animated header example (#177) (ebfecd7)
- assume headerHeight is 0 if HeaderComponent isn't provided (#132) (418c917)
- attempt at fixing lazy sometimes opening with 0 opacity (264cf00)
- better snapTimeout handling (db1988c)
- bring back pagerProps (2137bbd)
- bug when removing dynamic tab (d9c27a5)
- cancel snapping animations on drag (63fa2dc)
- change keyExtactor to use index and to be useCallback (95be6c2)
- collapsible-style: update min header height example (aff6c60)
- collapsible-style: use minHeaderHeight when calculating the iOS min height (bd373ac)
- conditional dynamic tabs (51bf7cf), closes #102
- content inset broken on react native (040e5c8), closes #113
- contentHeight should've been a map (321fa34)
- correct tabbar height (483ffcd)
- correct typo "cancelLazyFazeIn" (2b8b194)
- deps: remove peerDependenciesMeta field (a681d0a)
- diffclamp snap threshold (356cdbf)
- don't bounce pager on ios (fb49a97)
- dynamic tab sync (75c6e3a)
- edge case when swiping tab (5dedb14)
- edge case with tabs still scrolling to top (#230) (dd13cbc)
- ensure callers can't override onScroll (8421c65)
- ensure children is not undefined (bd4f0e2)
- ensure correct tab label ordering (1c2e65e), closes #77
- ensure top line (1px) is visible on iOS (#112) (d832baf)
- ensure we dont snap early while still gliding (e011a49)
- exclude documentation from library build (6826aa0), closes #105
- expo app (e1e4807)
- fix diffClamp tabs sync (304e8cc)
- flashlist rerender issue (0fc3092)
- flashlist with allowHeaderOverscroll (6d04616)
- handle ios overscroll (72b4e54)
- handle scroll to top ios (d96f2e2)
- indicator display for single tab (ed67c03)
- indicator glitch because scrollX was being reset (#131) (49a1348)
- infinite loop (f6a2f69)
- initial lazy position on ios (56789c1)
- initial scroll position if starting with undefined header height (9378af6)
- initial scroll position sometimes wrong on iOS (e349941)
- iOS issues when header height is undefined (#126) (5b2711b)
- ios refresh control (c09a3e8)
- ios without momentum scrolling (87e3124)
- ios: scroll sync issues between tabs (14dfc79)
- lazy (b383af9)
- lazy FlashList scroll sync issue (1b89ec7)
- lazy loading glitch with reanimated 3 (de032e9)
- lint and typescript errors (dc5fd39)
- memoize tabbar in example so it doesn't flicker (eeb94cc)
- minimum height with allowHeaderOverscroll (#229) (1e8ce9c)
- minor tabbar tweaks (b0cdcff)
- navigation bar zindex on ios (9fa6958)
- opacity stuck as 0 on lazy tab (sometimes) (8cfc596)
- pass actual FlashList ref to consumer (bb019c4)
- pass isGliding ref instead of current value and update types (37bf1b8), closes #33
- positioning issues (ada27de)
- prevent blank space on small content (98f7b7e), closes #8
- prevent diffclamp not syncing on tab press (1ec9dcd)
- prevent header not showing (534aa58), closes #16
- prevent not showing tab bar if no renderHeader (232561e), closes #39
- prevent not syncing on tab item press and momentum scrolling (5c5ff49)
- prevent not updating translateY if not providing the headerHeight (71cf7f4), closes #52
- prevent rerenders on layout (2e3aceb)
- prevent scrolling to top (1db8e4e)
- prevent types issues w/ conditional tabs (a05783e)
- prevent typescript error for conditional tabs (749c27b)
- recycling and re-rendering issues (f1cbbc8)
- remove console.log (668e1ba)
- remove ios scroll reset workaround (#127) (9e9d130)
- remove minHeight from contentContainerStyle (fa0e2ed), closes #8
- replace Dimensions by useWindowDimensions (d21b4b5)
- rework contentHeights to use a shared value (#146) (0cecd27)
- rework refs to fix scroll sync (ec513cd)
- scroll restoration when using Lazy (7c0ec48)
- scroll to correct position after window resizing (02da5a9)
- scroll to top on header (fed60c4), closes #137
- snapping when momentum scrolling (887b0d9)
- start with correct calculateNextOffset.value (fb405f7)
- sticky header edge case on android (7569a52)
- stop animated scroll on snap (72e87ac)
- switching lazy tabs sometimes jumps scroll position on ios (#120) (6c3e9fd)
- sync scroll position on dynamic tabs (4c9cfce)
- tab indicator did not work correctly in RTL mode (#193) (243848d)
- tab sync on ios when scrolling to the top (15ff5fc), closes #104
- tabs should not scroll to top (#205) (dd6d2ef)
- touchables not registering touches after scrolling (5598b11), closes #123
- usederivedvalue for tabnames value (92f22de)
chore
- update dependencies (eb8b645)
Code Refactoring
- hooks, container: avoid reading .value outside worklet (08a1c51)
- remove obsolete HeaderComponent and FooterComponent (cb2cb04)
Features
- add
snapTimeout
(3c476ca) - add
width
prop toTabs.Container
(#208) (4b9e738) - add collapsible tab view (ac0696b)
- add content container minHeight (a633910), closes #6 #8
- add createCollapsibleTabs (8383cef), closes #2 #38 #32 #26
- add default tab bar (4fa4026)
- add fade-in if headerHeight is undefined (21d9be0)
- add imperactive ref handler (a6c20fe)
- add initialTabName prop (7166592)
- add lazy support (4bfa80b), closes #19
- add minHeaderHeight prop (0036da3), closes #95 #5
- add onIndexChange prop (15a516c)
- add pagerProps (0f8b17b)
- add pressableProps to tab item (5ff176e)
- add renderHeader and renderTabBar (#154) (73af169)
- add sanity check (duplicate tabs not allowed) (5e18678)
- add scrollX to context (3f3b829)
- add tab item customization props in tab bar (fe4ac3c), closes #82
- add tab name context, remove name prop from scrollable components (c5166d2)
- allow callers to still hook into certain events we're also handling (6f32f1c)
- allow header to move down on pull to refresh on iOS (#228) (d0e063b)
- allow overriding route key property (c7ea905)
- createMaterialCollapsibleTopTabNavigator (e34a34b)
- custom label component (51a7234)
- dynamic tabbar (f4ebdfe)
- dynamic tabs (2884bba)
- export useCollapsibleStyle hook (dde28fe)
- expose hooks (06e693c)
- forward flatlist and scrollview refs (749cfbe)
- masonry (85f960d)
- progressViewOffset in useCollapsibleScene (13c444d)
- property on scrollable MaterialTabBar to keep tab in the center (6d35e31)
- reanimated v3 compatibility (f2e0f21)
- rename onIndexChange to onTabChange and add onIndexChange(number) (c02c88a)
- scroll on header (e02660f), closes #28
- SectionList support (without stickyHeaders for now) (#201) (1571a62)
- shopify/flash-list support (#332) (2ecc175)
- support custom refresh control component (273e0e7)
- useCurrentTabScrollY (73ee5d7)
Performance Improvements
- memoize (#134) (14bfaa0), closes #130
- optimize and reduce rerenders (#186) (a9d2a44)
- optimize useAnimatedReaction (9b5b0a9)
- snap using animated reaction scroll (5f11c61)
BREAKING CHANGES
- hooks, container: headerHeight, tabBarHeight, containerHeight, and
contentInset are no longer SharedValues.
If you consume useHeaderMeasurements and/or useTabsContext expect this
to impact you.
- Peer dependency changed to reanimated 3.8.1
- This version is only compatible with reanimated >= 3.0.1
useHeaderMeasurements
now returns
theheight
as anAnimated.SharedValue
- use
renderHeader
andrenderTabBar
instead - remove react-native-tab-view
v3 has nothing backward compatible, it's a completely new API.
- pass isGliding ref instead of isGliding.current
Migration: use isGliding.current instead of isGliding inside your
custom renderTabBar function