@omniumretail/component-library 1.2.15 → 1.2.16
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.
|
@@ -47,5 +47,6 @@ export interface ResponsiveTableCustomProps extends TableProps<any> {
|
|
|
47
47
|
buttonActionStyle?: string | ((record: any) => any);
|
|
48
48
|
cleanRowSelection?: boolean;
|
|
49
49
|
getRowActions?: (record: any) => any;
|
|
50
|
+
customSelectAllButton?: string;
|
|
50
51
|
}
|
|
51
52
|
export declare const ResponsiveTable: (props: ResponsiveTableCustomProps) => import("react/jsx-runtime").JSX.Element;
|
package/package.json
CHANGED
|
@@ -7,6 +7,7 @@ import { useTranslation } from 'react-i18next';
|
|
|
7
7
|
import { MoreOutlined } from '@ant-design/icons';
|
|
8
8
|
import classnames from 'classnames';
|
|
9
9
|
import { Button } from '../Button';
|
|
10
|
+
import classNames from 'classnames';
|
|
10
11
|
|
|
11
12
|
export interface FilterTableOptions {
|
|
12
13
|
value: string;
|
|
@@ -53,6 +54,7 @@ export interface ResponsiveTableCustomProps extends TableProps<any> {
|
|
|
53
54
|
buttonActionStyle?: string | ((record: any) => any);
|
|
54
55
|
cleanRowSelection?: boolean;
|
|
55
56
|
getRowActions?: (record: any) => any;
|
|
57
|
+
customSelectAllButton?: string;
|
|
56
58
|
}
|
|
57
59
|
|
|
58
60
|
export const ResponsiveTable = (props: ResponsiveTableCustomProps) => {
|
|
@@ -83,7 +85,8 @@ export const ResponsiveTable = (props: ResponsiveTableCustomProps) => {
|
|
|
83
85
|
buttonActionStyle,
|
|
84
86
|
buttonActionLabel,
|
|
85
87
|
cleanRowSelection,
|
|
86
|
-
getRowActions
|
|
88
|
+
getRowActions,
|
|
89
|
+
customSelectAllButton
|
|
87
90
|
} = props;
|
|
88
91
|
|
|
89
92
|
const [customFilters, setCustomFilters] = useState<any>([]);
|
|
@@ -291,6 +294,8 @@ export const ResponsiveTable = (props: ResponsiveTableCustomProps) => {
|
|
|
291
294
|
[styles.tableWrapperNoSelection]: !rowSelection
|
|
292
295
|
}, [styles.tableWrapper]);
|
|
293
296
|
|
|
297
|
+
const selectAllButtonStyle = classNames([styles.selectAllRows], [customSelectAllButton]);
|
|
298
|
+
|
|
294
299
|
return (
|
|
295
300
|
<div className={tableWrapperClasses}>
|
|
296
301
|
{shouldRenderSortDropdown &&
|
|
@@ -330,7 +335,7 @@ export const ResponsiveTable = (props: ResponsiveTableCustomProps) => {
|
|
|
330
335
|
/>
|
|
331
336
|
{
|
|
332
337
|
onSelectAllButtonClick &&
|
|
333
|
-
<Button onClick={selectAllRows} className={
|
|
338
|
+
<Button onClick={selectAllRows} className={selectAllButtonStyle}>
|
|
334
339
|
{selectedAllRowKeys ? t('components.table.deselectAll') : t('components.table.selectAll')}
|
|
335
340
|
</Button>
|
|
336
341
|
}
|