fix(ui) - dashboard card select all restrict to 30
This commit is contained in:
parent
d290cd8276
commit
1da8e12a30
2 changed files with 2 additions and 2 deletions
|
|
@ -19,7 +19,7 @@ interface IProps {
|
|||
}
|
||||
|
||||
type Props = IProps & RouteComponentProps;
|
||||
const MAX_CARDS = 30
|
||||
const MAX_CARDS = 29;
|
||||
function DashboardHeader(props: Props) {
|
||||
const { siteId, dashboardId } = props;
|
||||
const { dashboardStore } = useStore();
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@ function MetricsList({
|
|||
toggleSelection={toggleMetricSelection}
|
||||
allSelected={cards.length === selectedMetrics.length}
|
||||
toggleAll={({ target: { checked, name } }) =>
|
||||
setSelectedMetrics(checked ? cards.map((i: any) => i.metricId) : [])
|
||||
setSelectedMetrics(checked ? cards.map((i: any) => i.metricId).slice(0, 30 - existingCardIds!.length) : [])
|
||||
}
|
||||
/>
|
||||
) : (
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue