fix estimate table and expense items
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
"use client"
|
||||
|
||||
import { useState } from "react"
|
||||
import { useEffect, useState } from "react"
|
||||
import { useMutation } from "@tanstack/react-query"
|
||||
import { toast } from "sonner"
|
||||
import { confirm } from "@/shared/components/confirm-dialog"
|
||||
@@ -42,6 +42,10 @@ export function useResourcePage<TClient extends ResourcePageClient>({
|
||||
const { open: openDialog, close: closeDialog, isOpen, resourceId } = useFormDialog(paramKey)
|
||||
const [selectedItem, setSelectedItem] = useState<TItem | null>(null)
|
||||
|
||||
useEffect(() => {
|
||||
if (!resourceId) setSelectedItem(null)
|
||||
}, [resourceId])
|
||||
|
||||
const tableQuery = useDataTableQuery({
|
||||
queryKey: [routeKey],
|
||||
client,
|
||||
|
||||
Reference in New Issue
Block a user