@omniumretail/component-library 1.1.48 → 1.1.50
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,6 +47,9 @@ export interface ResponsiveTableCustomProps extends TableProps<any> {
|
|
|
47
47
|
columnsToSort?: string[];
|
|
48
48
|
fixedColumns?: { dataIndex: string; side: 'left' | 'right' }[];
|
|
49
49
|
customColumnWidths?: { columnName: string; width: string }[];
|
|
50
|
+
buttonActionName?: string;
|
|
51
|
+
buttonActionMethod?: () => void;
|
|
52
|
+
buttonActionStyle?: string;
|
|
50
53
|
}
|
|
51
54
|
|
|
52
55
|
export const ResponsiveTable = (props: ResponsiveTableCustomProps) => {
|
|
@@ -71,7 +74,10 @@ export const ResponsiveTable = (props: ResponsiveTableCustomProps) => {
|
|
|
71
74
|
sortByColumns,
|
|
72
75
|
columnsToSort,
|
|
73
76
|
fixedColumns,
|
|
74
|
-
customColumnWidths
|
|
77
|
+
customColumnWidths,
|
|
78
|
+
buttonActionName,
|
|
79
|
+
buttonActionMethod,
|
|
80
|
+
buttonActionStyle
|
|
75
81
|
} = props;
|
|
76
82
|
|
|
77
83
|
const [customFilters, setCustomFilters] = useState<any>([]);
|
|
@@ -199,6 +205,10 @@ export const ResponsiveTable = (props: ResponsiveTableCustomProps) => {
|
|
|
199
205
|
if (!items?.[0]) return null;
|
|
200
206
|
return (
|
|
201
207
|
<Space size="middle">
|
|
208
|
+
{buttonActionName &&
|
|
209
|
+
<Button customClass={buttonActionStyle} onClick={() => buttonActionMethod?.()}>{buttonActionName}</Button>
|
|
210
|
+
}
|
|
211
|
+
|
|
202
212
|
<Dropdown menu={{ items }}>
|
|
203
213
|
<a>
|
|
204
214
|
<MoreOutlined style={{ color: 'var(--color-blue)', transform: 'scale(1.6)' }} />
|