change(ui): fixed an issue with card create
This commit is contained in:
parent
cf147ff47d
commit
a9dcdb6d16
3 changed files with 7 additions and 2 deletions
|
|
@ -2,6 +2,7 @@ import React from 'react';
|
|||
import {Card, Col, Modal, Row, Typography} from "antd";
|
||||
import {Grid2x2CheckIcon, Plus} from "lucide-react";
|
||||
import NewDashboardModal from "Components/Dashboard/components/DashboardList/NewDashModal";
|
||||
import {useStore} from "App/mstore";
|
||||
|
||||
interface Props {
|
||||
open: boolean;
|
||||
|
|
@ -9,6 +10,7 @@ interface Props {
|
|||
}
|
||||
|
||||
function AddCardSelectionModal(props: Props) {
|
||||
const {metricStore} = useStore();
|
||||
const [open, setOpen] = React.useState(false);
|
||||
const [isLibrary, setIsLibrary] = React.useState(false);
|
||||
|
||||
|
|
@ -18,6 +20,9 @@ function AddCardSelectionModal(props: Props) {
|
|||
}
|
||||
|
||||
const onClick = (isLibrary: boolean) => {
|
||||
if (!isLibrary) {
|
||||
metricStore.init();
|
||||
}
|
||||
setIsLibrary(isLibrary);
|
||||
setOpen(true);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ interface Props {
|
|||
}
|
||||
|
||||
function CreateDashboardButton({disabled = false}: Props) {
|
||||
const [showModal, setShowModal] = React.useState(true);
|
||||
const [showModal, setShowModal] = React.useState(false);
|
||||
|
||||
return <>
|
||||
<Button
|
||||
|
|
|
|||
|
|
@ -115,7 +115,7 @@ function FilterSeries(props: Props) {
|
|||
};
|
||||
|
||||
return (
|
||||
<div className="border rounded-lg shadow-sm bg-white ">
|
||||
<div className="border rounded-lg shadow-sm bg-white">
|
||||
{canExclude && <ExcludeFilters filter={series.filter}/>}
|
||||
|
||||
{!hideHeader && (
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue