Skip to content

Commit

Permalink
chore(website): add example usage of useVisibleFilters hook
Browse files Browse the repository at this point in the history
  • Loading branch information
ZeekoZhu committed Feb 7, 2025
1 parent 11c7bd3 commit 8718c35
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions website/src/utils/install-dashboard-website-plugin.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { IPanelAddonRenderProps, pluginManager } from '@devtable/dashboard';
import { IPanelAddonRenderProps, pluginManager, useVisibleFilters } from '@devtable/dashboard';
import { ActionIcon } from '@mantine/core';
import { IconBug } from '@tabler/icons-react';
import React from 'react';
Expand All @@ -15,6 +15,7 @@ export const PrintEChartsOptionAddon = ({ viz, isInEditMode }: IPanelAddonRender
channel.off('rendered', listener);
};
}, [viz.messageChannels]);
const formattedFilters = useVisibleFilters();
if (!renderOptions || isInEditMode) {
return null;
}
Expand All @@ -24,7 +25,7 @@ export const PrintEChartsOptionAddon = ({ viz, isInEditMode }: IPanelAddonRender
onClick={(ev) => {
ev.stopPropagation();
ev.preventDefault();
console.log('ask ai', renderOptions);
console.log('debug', renderOptions, 'filters', formattedFilters);
}}
size="sm"
variant="transparent"
Expand Down

0 comments on commit 8718c35

Please sign in to comment.