@flamingo-stack/openframe-frontend-core 0.0.586 → 0.0.587-2000.5532.1
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/dist/{chunk-EAYMX22G.cjs → chunk-3FHWLQDG.cjs} +10 -10
- package/dist/{chunk-EAYMX22G.cjs.map → chunk-3FHWLQDG.cjs.map} +1 -1
- package/dist/{chunk-3HYHYKNL.js → chunk-3PDTGDOA.js} +4 -4
- package/dist/{chunk-XMTGLQSD.js → chunk-436G4DI4.js} +2 -2
- package/dist/{chunk-M36XSGZV.cjs → chunk-4IIFSFJ3.cjs} +13 -13
- package/dist/{chunk-M36XSGZV.cjs.map → chunk-4IIFSFJ3.cjs.map} +1 -1
- package/dist/{chunk-C3MRLZUI.cjs → chunk-5O5JMGEN.cjs} +33 -33
- package/dist/{chunk-C3MRLZUI.cjs.map → chunk-5O5JMGEN.cjs.map} +1 -1
- package/dist/{chunk-OZNFPQT5.js → chunk-6BFEJXMI.js} +2 -2
- package/dist/{chunk-NYLWMAHP.cjs → chunk-7WIKOL25.cjs} +4 -4
- package/dist/{chunk-NYLWMAHP.cjs.map → chunk-7WIKOL25.cjs.map} +1 -1
- package/dist/{chunk-P2CKLIOM.cjs → chunk-A5PXHMCJ.cjs} +49 -49
- package/dist/{chunk-P2CKLIOM.cjs.map → chunk-A5PXHMCJ.cjs.map} +1 -1
- package/dist/{chunk-KLWJRGNN.js → chunk-BLJEPNMJ.js} +3 -3
- package/dist/{chunk-3WR5R6H6.cjs → chunk-DMQMRFGS.cjs} +16 -16
- package/dist/{chunk-3WR5R6H6.cjs.map → chunk-DMQMRFGS.cjs.map} +1 -1
- package/dist/{chunk-6ZNWY6WW.cjs → chunk-DTQCZ6AR.cjs} +17 -17
- package/dist/{chunk-6ZNWY6WW.cjs.map → chunk-DTQCZ6AR.cjs.map} +1 -1
- package/dist/{chunk-XMK24INA.cjs → chunk-E7NFHRLX.cjs} +3 -3
- package/dist/{chunk-XMK24INA.cjs.map → chunk-E7NFHRLX.cjs.map} +1 -1
- package/dist/{chunk-2Y5UT5VF.js → chunk-F3YRPKUA.js} +2 -2
- package/dist/{chunk-YYC7V7YC.js → chunk-HCWZP44O.js} +4 -2
- package/dist/{chunk-YYC7V7YC.js.map → chunk-HCWZP44O.js.map} +1 -1
- package/dist/{chunk-V7ZJTUV2.cjs → chunk-IGBNEPTD.cjs} +3 -3
- package/dist/{chunk-V7ZJTUV2.cjs.map → chunk-IGBNEPTD.cjs.map} +1 -1
- package/dist/{chunk-BMORFCT2.cjs → chunk-KQ5JQVYL.cjs} +34 -34
- package/dist/{chunk-BMORFCT2.cjs.map → chunk-KQ5JQVYL.cjs.map} +1 -1
- package/dist/{chunk-L4WLYGB4.js → chunk-LODCKZ72.js} +2 -2
- package/dist/{chunk-4VZFJKPT.cjs → chunk-MF7TMFVB.cjs} +3 -3
- package/dist/{chunk-4VZFJKPT.cjs.map → chunk-MF7TMFVB.cjs.map} +1 -1
- package/dist/{chunk-NISAGFEM.cjs → chunk-MXCWOMNT.cjs} +3 -3
- package/dist/{chunk-NISAGFEM.cjs.map → chunk-MXCWOMNT.cjs.map} +1 -1
- package/dist/{chunk-S7YXLZNG.js → chunk-OKD7MX7Y.js} +4 -4
- package/dist/{chunk-YEQAA6I4.js → chunk-P24OI2CD.js} +2 -2
- package/dist/{chunk-6EZGJZVH.js → chunk-R2U2D7LU.js} +2 -2
- package/dist/{chunk-LV6CORVJ.js → chunk-SI57FQZ2.js} +2 -2
- package/dist/{chunk-3JVYM4ZN.js → chunk-SVR75PFW.js} +5 -5
- package/dist/{chunk-A6ETQEWK.cjs → chunk-UBSIENYF.cjs} +4 -2
- package/dist/chunk-UBSIENYF.cjs.map +1 -0
- package/dist/{chunk-PLMJVA2H.js → chunk-V4WUSOGS.js} +2 -2
- package/dist/{chunk-5OIXAV4P.js → chunk-VWNU2PFX.js} +2 -2
- package/dist/{chunk-SSGM2NKA.cjs → chunk-WQXWH7LF.cjs} +4 -4
- package/dist/{chunk-SSGM2NKA.cjs.map → chunk-WQXWH7LF.cjs.map} +1 -1
- package/dist/{chunk-QZYYNBMI.cjs → chunk-XNEPABUD.cjs} +17 -17
- package/dist/{chunk-QZYYNBMI.cjs.map → chunk-XNEPABUD.cjs.map} +1 -1
- package/dist/{chunk-DQUEVRDU.js → chunk-YB5DFQKD.js} +5 -5
- package/dist/components/case-studies/index.cjs +8 -8
- package/dist/components/case-studies/index.js +2 -2
- package/dist/components/contact/index.cjs +3 -3
- package/dist/components/contact/index.js +2 -2
- package/dist/components/docs/index.cjs +6 -6
- package/dist/components/docs/index.js +5 -5
- package/dist/components/embeds/index.cjs +3 -3
- package/dist/components/embeds/index.js +2 -2
- package/dist/components/faq/index.cjs +3 -3
- package/dist/components/faq/index.js +2 -2
- package/dist/components/features/index.cjs +2 -2
- package/dist/components/features/index.js +1 -1
- package/dist/components/help-center-pages/index.cjs +22 -22
- package/dist/components/help-center-pages/index.js +13 -13
- package/dist/components/index.cjs +29 -29
- package/dist/components/index.js +12 -12
- package/dist/components/meeting-scheduler/index.cjs +18 -18
- package/dist/components/meeting-scheduler/index.js +1 -1
- package/dist/components/navigation/index.cjs +5 -5
- package/dist/components/navigation/index.js +4 -4
- package/dist/components/onboarding-guides/index.cjs +5 -5
- package/dist/components/onboarding-guides/index.js +4 -4
- package/dist/components/tickets/index.cjs +6 -6
- package/dist/components/tickets/index.js +5 -5
- package/dist/components/ui/data-table/use-data-table.d.ts.map +1 -1
- package/dist/components/ui/index.cjs +2 -2
- package/dist/components/ui/index.js +1 -1
- package/dist/index.cjs +6 -6
- package/dist/index.js +5 -5
- package/package.json +1 -1
- package/src/components/ui/__tests__/data-table-compiler-identity.test.tsx +74 -0
- package/src/components/ui/data-table/use-data-table.ts +36 -1
- package/dist/chunk-A6ETQEWK.cjs.map +0 -1
- /package/dist/{chunk-3HYHYKNL.js.map → chunk-3PDTGDOA.js.map} +0 -0
- /package/dist/{chunk-XMTGLQSD.js.map → chunk-436G4DI4.js.map} +0 -0
- /package/dist/{chunk-OZNFPQT5.js.map → chunk-6BFEJXMI.js.map} +0 -0
- /package/dist/{chunk-KLWJRGNN.js.map → chunk-BLJEPNMJ.js.map} +0 -0
- /package/dist/{chunk-2Y5UT5VF.js.map → chunk-F3YRPKUA.js.map} +0 -0
- /package/dist/{chunk-L4WLYGB4.js.map → chunk-LODCKZ72.js.map} +0 -0
- /package/dist/{chunk-S7YXLZNG.js.map → chunk-OKD7MX7Y.js.map} +0 -0
- /package/dist/{chunk-YEQAA6I4.js.map → chunk-P24OI2CD.js.map} +0 -0
- /package/dist/{chunk-6EZGJZVH.js.map → chunk-R2U2D7LU.js.map} +0 -0
- /package/dist/{chunk-LV6CORVJ.js.map → chunk-SI57FQZ2.js.map} +0 -0
- /package/dist/{chunk-3JVYM4ZN.js.map → chunk-SVR75PFW.js.map} +0 -0
- /package/dist/{chunk-PLMJVA2H.js.map → chunk-V4WUSOGS.js.map} +0 -0
- /package/dist/{chunk-5OIXAV4P.js.map → chunk-VWNU2PFX.js.map} +0 -0
- /package/dist/{chunk-DQUEVRDU.js.map → chunk-YB5DFQKD.js.map} +0 -0
|
@@ -98,7 +98,12 @@ export function useDataTable<T>({
|
|
|
98
98
|
getFilteredRowModel: getFilteredRowModelOverride,
|
|
99
99
|
...rest
|
|
100
100
|
}: UseDataTableOptions<T>): Table<T> {
|
|
101
|
-
|
|
101
|
+
// Opted out of the React Compiler on purpose — see the handle published at the
|
|
102
|
+
// end of this function. Nothing here is worth memoizing anyway: `setOptions`
|
|
103
|
+
// runs on every render regardless.
|
|
104
|
+
'use no memo';
|
|
105
|
+
|
|
106
|
+
const table = useReactTable<T>({
|
|
102
107
|
...rest,
|
|
103
108
|
getCoreRowModel: coreRowModelFactory as TableOptions<T>['getCoreRowModel'],
|
|
104
109
|
getSortedRowModel: clientSideSorting
|
|
@@ -110,4 +115,34 @@ export function useDataTable<T>({
|
|
|
110
115
|
manualSorting: manualSorting ?? !clientSideSorting,
|
|
111
116
|
manualFiltering: manualFiltering ?? !clientSideFiltering,
|
|
112
117
|
});
|
|
118
|
+
|
|
119
|
+
// A fresh handle per render, and the reason this hook doesn't just return
|
|
120
|
+
// `useReactTable`'s value.
|
|
121
|
+
//
|
|
122
|
+
// `useReactTable` creates ONE instance for the life of the component and
|
|
123
|
+
// mutates it in place, so its identity is the same object whether a page of
|
|
124
|
+
// rows just arrived or nothing happened at all. Every consumer reads rows and
|
|
125
|
+
// state back out of that instance through context (`DataTable.Body`,
|
|
126
|
+
// `.Header`, `.RowCount`, `.CursorFooter`) — which worked only because the
|
|
127
|
+
// caller re-rendered and rebuilt their elements.
|
|
128
|
+
//
|
|
129
|
+
// Under the React Compiler it stops working, because the compiler caches on
|
|
130
|
+
// identity: `<DataTable table={table}>` and its children get cached on
|
|
131
|
+
// `table`, and inside the compiled `DataTableBody` the entire body —
|
|
132
|
+
// `table.getRowModel().rows` included — sits behind a `$[n] !== table` guard.
|
|
133
|
+
// A table that gains rows then renders nothing new. On an infinite-scroll
|
|
134
|
+
// table that is a loop: the sentinel never moves down, so
|
|
135
|
+
// `DataTable.InfiniteFooter` asks for the next page forever.
|
|
136
|
+
//
|
|
137
|
+
// The proxy forwards every read, write and TanStack mutation to that single
|
|
138
|
+
// instance, so nothing about the table's behaviour changes — only its
|
|
139
|
+
// identity, which is what puts it back inside React's reactive graph.
|
|
140
|
+
//
|
|
141
|
+
// The `use no memo` at the top of this hook is what keeps it a FRESH handle:
|
|
142
|
+
// without it the compiler caches this very object on `table` and hands back
|
|
143
|
+
// the same one forever, i.e. the bug. Keying a `useMemo` on
|
|
144
|
+
// `getRowModel()`/`getState()` instead is not better — `useReactTable`
|
|
145
|
+
// rebuilds `options.state` on every render anyway, so it would republish just
|
|
146
|
+
// as often while reading as though it did not.
|
|
147
|
+
return new Proxy(table, {});
|
|
113
148
|
}
|