mirror of
https://github.com/rowyio/rowy.git
synced 2025-12-29 00:16:39 +01:00
delete row functionality
This commit is contained in:
@@ -51,7 +51,6 @@ export const onCellSelected = (args: any) => {
|
||||
};
|
||||
export const cellFormatter = (column: any) => {
|
||||
const { type, key, options } = column;
|
||||
console.log(column);
|
||||
switch (type) {
|
||||
case FieldType.date:
|
||||
case FieldType.dateTime:
|
||||
|
||||
@@ -107,6 +107,15 @@ function Table(props: any) {
|
||||
name: "Add column",
|
||||
width: 160,
|
||||
headerRenderer: headerRenderer,
|
||||
formatter: (props: any) => (
|
||||
<Button
|
||||
onClick={() => {
|
||||
props.row.ref.delete();
|
||||
}}
|
||||
>
|
||||
Delete row
|
||||
</Button>
|
||||
),
|
||||
});
|
||||
const rows = tableState.rows; //.map((row: any) => ({ height: 100, ...row }));
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user