mirror of
https://github.com/cssgunc/compass.git
synced 2025-04-17 17:30:17 -04:00
Fixed type errors for RowOpenAction
This commit is contained in:
parent
598b9dd784
commit
966834d34d
|
@ -18,8 +18,8 @@ export function ResourceTable({ resources }: { resources: Resource[] }) {
|
|||
"volunteer",
|
||||
"employee",
|
||||
])
|
||||
|
||||
const handleRowUpdate = (updatedRow: Resource) => {
|
||||
|
||||
const handleRowUpdate = (updatedRow: DataPoint) => {
|
||||
const dataIndex = data.findIndex((row) => row.id === updatedRow.id);
|
||||
if (dataIndex !== -1) {
|
||||
const updatedData = [...data];
|
||||
|
|
|
@ -1,10 +1,17 @@
|
|||
import Drawer from "@/components/Drawer/Drawer";
|
||||
import { ChangeEvent, useState } from "react";
|
||||
import { useState } from "react";
|
||||
import { DataPoint } from "@/components/Table/Table";
|
||||
|
||||
export const RowOpenAction = ({ title, rowData, onRowUpdate }) => {
|
||||
type RowOpenActionProps = {
|
||||
title: string,
|
||||
rowData: DataPoint,
|
||||
onRowUpdate: (updatedRow: DataPoint) => void;
|
||||
}
|
||||
|
||||
export const RowOpenAction = ({ title, rowData, onRowUpdate }: RowOpenActionProps) => {
|
||||
const [pageContent, setPageContent] = useState("");
|
||||
|
||||
const handleDrawerContentChange = (newContent) => {
|
||||
const handleDrawerContentChange = (newContent: string) => {
|
||||
setPageContent(newContent);
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user