Skip to content

Commit

Permalink
fix breakdown
Browse files Browse the repository at this point in the history
  • Loading branch information
Dosant committed Oct 15, 2024
1 parent c218e7c commit 62e696f
Showing 1 changed file with 9 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -194,16 +194,20 @@ export const useDegradedDocsChart = () => {

const extraActions: Action[] = [getOpenInLensAction, getOpenInLogsExplorerAction];

return {
attributes,
dataView,
breakdown: {
const breakdown = useMemo(() => {
return {
dataViewField: breakdownDataViewField,
fieldSupportsBreakdown: breakdownDataViewField
? fieldSupportsBreakdown(breakdownDataViewField)
: true,
onChange: handleBreakdownFieldChange,
},
};
}, [breakdownDataViewField, handleBreakdownFieldChange]);

return {
attributes,
dataView,
breakdown,
extraActions,
isChartLoading,
onChartLoading: handleChartLoading,
Expand Down

0 comments on commit 62e696f

Please sign in to comment.