PromucFlow_constructor/app/client/src/widgets/TableWidget.tsx

28 lines
730 B
TypeScript
Raw Normal View History

2019-09-12 08:11:25 +00:00
import React from "react";
import BaseWidget, { WidgetProps, WidgetState } from "./BaseWidget";
2019-09-12 08:11:25 +00:00
import { WidgetType } from "../constants/WidgetConstants";
import { ActionPayload } from "../constants/ActionConstants";
2019-09-12 08:11:25 +00:00
class TableWidget extends BaseWidget<TableWidgetProps, WidgetState> {
2019-09-12 08:11:25 +00:00
getPageView() {
return <div />;
2019-09-12 08:11:25 +00:00
}
getWidgetType(): WidgetType {
return "TABLE_WIDGET";
}
}
export type PaginationType = "PAGES" | "INFINITE_SCROLL";
2019-09-12 08:11:25 +00:00
export interface TableWidgetProps extends WidgetProps {
2019-09-12 08:11:25 +00:00
pageKey?: string;
label: string;
tableData?: object[];
onPageChange?: ActionPayload[];
onRowSelected?: ActionPayload[];
onColumnActionClick?: Record<string, ActionPayload[]>;
2019-09-12 08:11:25 +00:00
}
export default TableWidget;