Skip to content

Commit

Permalink
Fix build issue
Browse files Browse the repository at this point in the history
  • Loading branch information
vikashsprem committed Sep 28, 2024
1 parent 928564e commit b1161eb
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions keep-ui/app/dashboard/WidgetModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@ import React, { useState, useEffect, ChangeEvent, FormEvent } from "react";
import Modal from "@/components/ui/Modal";
import { Button, Subtitle, TextInput, Select, SelectItem, Icon } from "@tremor/react";
import { Trashcan } from "components/icons";
import { MerticsMeta, Threshold, WidgetData } from "./types";
import { Threshold, WidgetData } from "./types";
import { Preset } from "app/alerts/models";
import { useForm, Controller, get } from "react-hook-form";
import { Dashboard } from '../../utils/hooks/useDashboards';
import { on } from "events";

interface WidgetForm {
widgetName: string;
Expand Down Expand Up @@ -155,9 +156,7 @@ const WidgetModal: React.FC<WidgetModalProps> = ({ isOpen, onClose, onAddWidget,
control={control}
rules={{ required: { value: true, message: "Preset selection is required" } }}
render={({ field }) => {
useEffect(() => {
setCurrentWidgetType(field.value);
}, [field.value]);
setCurrentWidgetType(field.value);
return <Select
{...field}
placeholder="Select a Widget Type"
Expand Down

0 comments on commit b1161eb

Please sign in to comment.