@objectql/studio 1.7.2 → 1.7.3
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 +6 -0
- package/LICENSE +118 -21
- package/dist/assets/{index-c126GlTy.js → index-BZVSxINM.js} +2 -2
- package/dist/index.html +1 -1
- package/package.json +2 -1
- package/src/components/DataGrid.tsx +3 -2
- package/src/components/ObjectList.tsx +1 -1
- package/src/components/RecordDetail.tsx +4 -2
- package/src/components/SchemaInspector.tsx +4 -1
- package/src/hooks/use-metadata.ts +2 -2
- package/src/pages/MetadataBrowser.tsx +1 -1
- package/src/pages/ObjectView.tsx +7 -3
- package/tsconfig.tsbuildinfo +1 -1
package/src/pages/ObjectView.tsx
CHANGED
|
@@ -98,7 +98,8 @@ export function ObjectView({ objectName }: ObjectViewProps) {
|
|
|
98
98
|
})
|
|
99
99
|
});
|
|
100
100
|
const resJson = await response.json();
|
|
101
|
-
|
|
101
|
+
// Support new format (items) and old format (data)
|
|
102
|
+
const rows = resJson.items || resJson.data || resJson; // normalize
|
|
102
103
|
|
|
103
104
|
// 4. Fetch Count (for total pagination)
|
|
104
105
|
// Optimization: Only fetch count if we don't know it or filter changed?
|
|
@@ -113,11 +114,14 @@ export function ObjectView({ objectName }: ObjectViewProps) {
|
|
|
113
114
|
body: JSON.stringify({
|
|
114
115
|
op: 'count',
|
|
115
116
|
object: objectName,
|
|
116
|
-
args:
|
|
117
|
+
args: {
|
|
118
|
+
filters: filters.length > 0 ? filters : undefined
|
|
119
|
+
}
|
|
117
120
|
})
|
|
118
121
|
});
|
|
119
122
|
const countJson = await countRes.json();
|
|
120
|
-
|
|
123
|
+
// Count operation returns { count: number, '@type': string }
|
|
124
|
+
lastRow = typeof countJson === 'number' ? countJson : countJson.count;
|
|
121
125
|
}
|
|
122
126
|
|
|
123
127
|
params.successCallback(rows, lastRow);
|