Skip to content

Commit 3d2cf29

Browse files
authored
Merge pull request #1223 from merico-dev/1219-query-usage-counts-wrong-ignoring-main-views-filters
1219 query usage counts wrong, ignoring filters
2 parents dbbb009 + 3d37fe5 commit 3d2cf29

File tree

7 files changed

+18
-16
lines changed

7 files changed

+18
-16
lines changed

api/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@devtable/api",
3-
"version": "10.42.2",
3+
"version": "10.42.3",
44
"description": "",
55
"main": "index.js",
66
"scripts": {

dashboard/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@devtable/dashboard",
3-
"version": "10.42.2",
3+
"version": "10.42.3",
44
"license": "Apache-2.0",
55
"publishConfig": {
66
"access": "public",

dashboard/src/dashboard-editor/model/content/index.ts

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -210,16 +210,18 @@ const _ContentModel = types
210210
const filterQueryID = _.get(f, 'config.options_query_id');
211211
return !!filterQueryID;
212212
})
213-
.map((f) => ({
214-
type: 'filter',
215-
id: f.id,
216-
queryID: _.get(f, 'config.options_query_id'),
217-
label: f.label,
218-
views: f.visibleInViewsIDs.map((id) => ({
219-
id,
220-
label: viewIDMap.get(id)?.name ?? id,
221-
})),
222-
}));
213+
.forEach((f) => {
214+
usages.push({
215+
type: 'filter',
216+
id: f.id,
217+
queryID: _.get(f, 'config.options_query_id'),
218+
label: f.label,
219+
views: f.visibleInViewsIDs.map((id) => ({
220+
id,
221+
label: viewIDMap.get(id)?.name ?? id,
222+
})),
223+
});
224+
});
223225

224226
return _.groupBy(usages, 'queryID');
225227
},

dashboard/src/dashboard-editor/ui/settings/content/edit-query/query-editor-form/query-usage.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ export const QueryUsage = observer(({ queryID, usage }: IQueryUsage) => {
4848
<td>
4949
<Stack align="flex-start" justify="flex-start" spacing={2}>
5050
{u.views.map((v) => (
51-
<Anchor component="button" type="button" onClick={() => openView(v.id)}>
51+
<Anchor key={v.id} component="button" type="button" onClick={() => openView(v.id)}>
5252
<Box>{v.label}</Box>
5353
</Anchor>
5454
))}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@devtable/root",
3-
"version": "10.42.2",
3+
"version": "10.42.3",
44
"private": true,
55
"workspaces": [
66
"api",

settings-form/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@devtable/settings-form",
3-
"version": "10.42.2",
3+
"version": "10.42.3",
44
"license": "Apache-2.0",
55
"publishConfig": {
66
"access": "public",

website/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "@devtable/website",
33
"private": true,
44
"license": "Apache-2.0",
5-
"version": "10.42.2",
5+
"version": "10.42.3",
66
"scripts": {
77
"dev": "vite",
88
"preview": "vite preview"

0 commit comments

Comments
 (0)