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

33 lines
812 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 TableAction extends ActionPayload {
actionName: string;
}
export interface TableWidgetProps extends WidgetProps {
nextPageKey?: string;
prevPageKey?: string;
label: string;
tableData?: object[];
recordActions?: TableAction[];
onPageChange?: ActionPayload[];
onRowSelected?: ActionPayload[];
2019-09-12 08:11:25 +00:00
}
export default TableWidget;