1.9.1 • Published 3 years ago
addtocartbootcamp v1.9.1
ADD TO CART Mini-app
Changelogs
- v1.9.2 - fixing error [error: Uncaught Error: Invalid hook ] change react version to 17.0.2
- v1.8.2 - fixing error [error: Uncaught Error: Invalid hook ] change react version and ts
- v1.7.2 - fixing error [error: Uncaught Error: Invalid hook ] change react version
- v1.5.2 - fixing error [error: Uncaught Error: Invalid hook ] remove Box
- v1.4.2 - fixing error [error: Uncaught Error: Invalid hook ] remove mui
- v1.3.2 - fixing error [error: Uncaught Error: Invalid hook ] remove card
- v1.2.2 - fixing error [error: not rendered in real project 2]
- v1.1.2 - fixing error [error: not rendered in real project]
- v1.0.1 - Add Sample Card and Storybook
- v1.0.1 - Add styles and postcss
- v1.0.0 - Button Component
Installation
npm install serino-mapp-admin-table-list
For manual installation
npm i addtocartbootcamp
Usage
import { AdminTableListMApp, exampleData } from "serino-mapp-admin-table-list"
// ...
// log exampleData to see the requirements
<TableList {...exampleData} />
Types
{
dataLoad: {
// Table
rows: { [key: string]: any }[];
rowsTotal: number;
subtotal: number | string;
grandTotal: number | string;
// Filter List
filterList: {
[key: string]: any[];
};
};
dataIn: {
// View List Title
title: string;
tabs: {
options?: {
label: string | number;
value: string | number;
}[];
};
filterSection?: {
filterProps?: {
show?: Boolean;
icons?: { startIcon?: HTMLElement | string, endIcon?: HTMLElement | string }
label: string;
options?: {
name: string;
key: string[] | string;
type: "date" | "daterange" | "select";
}[];
};
searchProps?: {
show?: Boolean;
placeholder: string;
string?: number;
};
actionProps?: {
show?: Boolean;
icons?: { startIcon?: HTMLElement | string, endIcon?: HTMLElement | string }
label: string;
options?: {
name: string;
action: void;
}[];
autoClose?: Boolean;
};
redirectionProps?: {
show?: Boolean;
icons?: { startIcon?: HTMLElement | string, endIcon?: HTMLElement | string }
label: string;
action: void;
};
};
table: {
importCSV?: {
show?: Boolean;
label: string;
icons?: {
startIcon?: HTMLElement | string;
endIcon?: HTMLElement | string;
};
action: () => void;
add: () => void;
import: () => void;
};
overrideProps: { [key: string]: any }; // override all props of table
selectionKey?: string;
columns: GridColDef;
actionBars: {
label: string;
action: void;
}[];
rowActions: {
label: string;
action: void;
divider?: Boolean;
autoClose?: Boolean;
}[];
};
styles: {
[key: string]: CSSProperties;
};
};
dataOut: (arg0: any) => void;
}
Peer Dependecies
"react": "^18.2.0",
"react-dom": "^18.2.0"
Node Version
v16.15.0