Skip to content

Commit 772cde3

Browse files
authored
Merge pull request #1217 from scottsut/dev
refactor: add drill level limitation to chart editor & share page
2 parents e02118a + 0ab0ff4 commit 772cde3

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

frontend/src/app/components/ChartEditor.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,10 @@ export const ChartEditor: FC<ChartEditorProps> = ({
212212
{
213213
name: 'click',
214214
callback: param => {
215-
if (drillOptionRef.current?.isSelectedDrill) {
215+
if (
216+
drillOptionRef.current?.isSelectedDrill &&
217+
!drillOptionRef.current.isBottomLevel
218+
) {
216219
const option = drillOptionRef.current;
217220
option.drillDown(param.data.rowData);
218221
drillOptionRef.current = option;

frontend/src/app/pages/SharePage/ChartForShare.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,10 @@ const ChartForShare: FC<{
8888
{
8989
name: 'click',
9090
callback: param => {
91-
if (drillOptionRef.current?.isSelectedDrill) {
91+
if (
92+
drillOptionRef.current?.isSelectedDrill &&
93+
!drillOptionRef.current.isBottomLevel
94+
) {
9295
const option = drillOptionRef.current;
9396
option.drillDown(param.data.rowData);
9497
drillOptionRef.current = option;

0 commit comments

Comments
 (0)