aio-table 9.1.8 → 9.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.d.ts +1 -1
- package/index.js +3 -2
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -95,5 +95,5 @@ export type I_table<T> = {
|
|
|
95
95
|
gap?: [number, number];
|
|
96
96
|
striped?: [string, string];
|
|
97
97
|
};
|
|
98
|
-
declare const AIOTable: <T>(props: I_table<T>) => JSX.Element;
|
|
98
|
+
declare const AIOTable: <T>(props: I_table<T>) => import("react/jsx-runtime").JSX.Element;
|
|
99
99
|
export default AIOTable;
|
package/index.js
CHANGED
|
@@ -253,7 +253,7 @@ const AIOTable = (props) => {
|
|
|
253
253
|
getRowsIndexDic, add, remove, search, exportToExcel, DragColumns, getIcon, popup,
|
|
254
254
|
};
|
|
255
255
|
return (_jsxs(Provider, { value: context, children: [_jsxs("div", Object.assign({}, attrs, { children: [_jsx(TableToolbar, {}), !!props.filter &&
|
|
256
|
-
_jsx(Filterbar, { columns: filterColumns, filter: props.filter, columnOption: { text: (column) => column.title, id: (column) => column.filterId, type: (column) => column.type || 'text' } }), _jsxs("div", { className: 'aio-table-unit aio-table-scroll', style: { gap: gap[1] }, children: [_jsx(TableHeader, {}), _jsx(TableRows, {})] }), pagingHook.render()] })), popup.render()] }));
|
|
256
|
+
_jsx(Filterbar, { columns: filterColumns, filter: props.filter, fa: props.fa, columnOption: { text: (column) => column.title, id: (column) => column.filterId, type: (column) => column.type || 'text' } }), _jsxs("div", { className: 'aio-table-unit aio-table-scroll', style: { gap: gap[1] }, children: [_jsx(TableHeader, {}), _jsx(TableRows, {})] }), pagingHook.render()] })), popup.render()] }));
|
|
257
257
|
};
|
|
258
258
|
export default AIOTable;
|
|
259
259
|
const TableRows = () => {
|
|
@@ -307,7 +307,8 @@ const TableToolbar = () => {
|
|
|
307
307
|
}
|
|
308
308
|
return typeof addText === 'function' ? addText(value) : addText;
|
|
309
309
|
}
|
|
310
|
-
return (_jsxs("div", Object.assign({}, toolbarAttrs, { children: [toolbar && _jsx("div", { className: 'aio-table-toolbar-content', children: typeof toolbar === 'function' ? toolbar() : toolbar }),
|
|
310
|
+
return (_jsxs("div", Object.assign({}, toolbarAttrs, { children: [toolbar && _jsx("div", { className: 'aio-table-toolbar-content', children: typeof toolbar === 'function' ? toolbar() : toolbar }), !!onSearch &&
|
|
311
|
+
_jsx("div", { className: 'aio-table-search', children: _jsx(AIOInput, { type: 'text', onChange: (value) => search(value), after: getIcon('mdiMagnify', 0.7) }) }), sortHook.renderSortButton(), !!excelColumns.length && _jsx("div", { className: 'aio-table-toolbar-button', onClick: () => exportToExcel(), children: getIcon('mdiFileExcel', 0.8) }), !!onAdd && _jsx("div", { className: 'aio-table-toolbar-button', onClick: () => add(), children: getAddText() })] })));
|
|
311
312
|
};
|
|
312
313
|
const TableHeader = () => {
|
|
313
314
|
let { rootProps, columns } = useProvider();
|