fix(ui) - widget remove fix id null
This commit is contained in:
parent
c9b1813e6a
commit
0b999aa7bf
1 changed files with 2 additions and 1 deletions
|
|
@ -32,6 +32,7 @@ function WidgetWrapper(props: Props) {
|
|||
const { isWidget = false, active = false, index = 0, moveListItem = null, isPreview = false, isTemplate = false, dashboardId, siteId } = props;
|
||||
const widget: any = useObserver(() => props.widget);
|
||||
const isPredefined = widget.metricType === 'predefined';
|
||||
const dashboard = useObserver(() => dashboardStore.selectedDashboard);
|
||||
|
||||
const [{ opacity, isDragging }, dragRef] = useDrag({
|
||||
type: 'item',
|
||||
|
|
@ -55,7 +56,7 @@ function WidgetWrapper(props: Props) {
|
|||
})
|
||||
|
||||
const onDelete = async () => {
|
||||
dashboardStore.deleteDashboardWidget(dashboardId!, widget.widgetId);
|
||||
dashboardStore.deleteDashboardWidget(dashboard?.dashboardId, widget.widgetId);
|
||||
// if (await confirm({
|
||||
// header: 'Confirm',
|
||||
// confirmButton: 'Yes, delete',
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue