delete row functionality

This commit is contained in:
shams mosowi
2019-09-24 17:54:49 +10:00
parent cf7c9d1577
commit 25f268f2ed
2 changed files with 9 additions and 1 deletions

View File

@@ -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:

View File

@@ -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 (