PromucFlow_constructor/app/client/src/widgets/TableWidget.tsx
Nikhil Nandagopal 5f6aeb55f8 added new control types
removed alert from widget list
added property config values
added input validator
2019-09-19 16:59:24 +05:30

33 lines
812 B
TypeScript

import React from "react";
import BaseWidget, { WidgetProps, WidgetState } from "./BaseWidget";
import { WidgetType } from "../constants/WidgetConstants";
import { ActionPayload } from "../constants/ActionConstants";
class TableWidget extends BaseWidget<TableWidgetProps, WidgetState> {
getPageView() {
return <div />;
}
getWidgetType(): WidgetType {
return "TABLE_WIDGET";
}
}
export type PaginationType = "PAGES" | "INFINITE_SCROLL";
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[];
}
export default TableWidget;