From 421f9c9fc09dd766fc4ea8405f55e0b1cd82fd8d Mon Sep 17 00:00:00 2001 From: Andrey Yamanov Date: Wed, 5 Feb 2025 14:11:41 +0100 Subject: [PATCH] fix(cubejs-playground): update query builder --- .../src/QueryBuilderV2/QueryBuilderExtras.tsx | 1 + .../QueryBuilderV2/components/SidePanelCubeItem.tsx | 10 +++++----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/packages/cubejs-playground/src/QueryBuilderV2/QueryBuilderExtras.tsx b/packages/cubejs-playground/src/QueryBuilderV2/QueryBuilderExtras.tsx index d499375154e82..815b15d85a5e2 100644 --- a/packages/cubejs-playground/src/QueryBuilderV2/QueryBuilderExtras.tsx +++ b/packages/cubejs-playground/src/QueryBuilderV2/QueryBuilderExtras.tsx @@ -55,6 +55,7 @@ const LIMIT_OPTIONS: { key: number; label: string }[] = [ { key: 100, label: '100' }, { key: 1000, label: '1,000' }, { key: 5000, label: '5,000' }, + { key: 50000, label: '50,000' }, { key: 0, label: 'Default limit' }, ]; const LIMIT_OPTION_VALUES = LIMIT_OPTIONS.map((option) => option.key) as number[]; diff --git a/packages/cubejs-playground/src/QueryBuilderV2/components/SidePanelCubeItem.tsx b/packages/cubejs-playground/src/QueryBuilderV2/components/SidePanelCubeItem.tsx index 7eff42673eec9..a30faba2e4227 100644 --- a/packages/cubejs-playground/src/QueryBuilderV2/components/SidePanelCubeItem.tsx +++ b/packages/cubejs-playground/src/QueryBuilderV2/components/SidePanelCubeItem.tsx @@ -1,4 +1,4 @@ -import { Cube, TCubeDimension, TCubeMeasure, TCubeSegment } from '@cubejs-client/core'; +import { Cube } from '@cubejs-client/core'; import { ReactElement, useEffect, useMemo, useRef, useState } from 'react'; import { Block, Button, Space, tasty, Text, CubeIcon, ViewIcon } from '@cube-dev/ui-kit'; @@ -589,8 +589,8 @@ export function SidePanelCubeItem(props: CubeListItemProps) { ...hierarchyNames.filter((hierarchy) => folder.members.includes(hierarchy)), ...dimensions.filter((dimension) => folder.members.includes(dimension)), ].sort(sortFn), - ...measures.filter((measure) => folder.members.includes(measure)), - ...segments.filter((segment) => folder.members.includes(segment)) + ...measures.filter((measure) => folder.members.includes(measure)).sort(sortFn), + ...segments.filter((segment) => folder.members.includes(segment)).sort(sortFn) ); return acc; @@ -606,8 +606,8 @@ export function SidePanelCubeItem(props: CubeListItemProps) { (dimension) => !folderMembers.includes(dimension) && !hierarchyMembers.includes(dimension) ), ].sort(sortFn), - ...measures.filter((measure) => !folderMembers.includes(measure)), - ...segments.filter((segment) => !folderMembers.includes(segment)), + ...measures.filter((measure) => !folderMembers.includes(measure)).sort(sortFn), + ...segments.filter((segment) => !folderMembers.includes(segment)).sort(sortFn), ]; // When switching between to and from search mode reset the open instances