@ai-matrx/records 0.58.20 → 0.58.22
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 +18 -2
- package/dist/react/index.cjs +6 -2
- package/dist/react/index.cjs.map +1 -1
- package/dist/react/index.js +6 -2
- package/dist/react/index.js.map +1 -1
- package/package.json +1 -1
package/dist/react/index.js
CHANGED
|
@@ -7887,13 +7887,17 @@ function useAsync(run, deps, share) {
|
|
|
7887
7887
|
return { ...state, reload, setData };
|
|
7888
7888
|
}
|
|
7889
7889
|
function useTable(tableId) {
|
|
7890
|
+
const revision = useShapeRevision(tableId);
|
|
7891
|
+
useEffect(() => {
|
|
7892
|
+
if (tableId) registerShapeInterest(tableId);
|
|
7893
|
+
}, [tableId]);
|
|
7890
7894
|
return useAsync(
|
|
7891
7895
|
async (client) => {
|
|
7892
7896
|
if (!tableId) return { ok: true, data: null };
|
|
7893
7897
|
return client.tableRead({ table_id: tableId });
|
|
7894
7898
|
},
|
|
7895
|
-
[tableId],
|
|
7896
|
-
tableId ? `table:${tableId}` : null
|
|
7899
|
+
[tableId, revision],
|
|
7900
|
+
tableId ? `table:${tableId}:${revision}` : null
|
|
7897
7901
|
);
|
|
7898
7902
|
}
|
|
7899
7903
|
function useTables() {
|