@omniumretail/component-library 1.2.67 → 1.2.68
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/package.json
CHANGED
|
@@ -55,18 +55,27 @@ const Template: Story<ResponsiveTableCustomProps> = (args) => {
|
|
|
55
55
|
];
|
|
56
56
|
};
|
|
57
57
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
58
|
+
const getIcon = (record: any) => {
|
|
59
|
+
return record.id === "1"
|
|
60
|
+
? <DownloadOutlined />
|
|
61
|
+
: record.id === "3"
|
|
62
|
+
? <DownloadOutlined />
|
|
63
|
+
: null;
|
|
64
|
+
};
|
|
65
65
|
|
|
66
66
|
const actionsArray = [{ key: '1', label: `` }];
|
|
67
67
|
|
|
68
68
|
return <ResponsiveTable
|
|
69
69
|
cleanRowSelection={clearRowSelection}
|
|
70
|
+
onRow={(record: any) => {
|
|
71
|
+
return {
|
|
72
|
+
style: {
|
|
73
|
+
opacity: (record.Status === "I" || record.Status === "Draft") ? 0.5 : 1,
|
|
74
|
+
boxShadow: record.Status === "Draft" ? "inset 2px 0 0 #FF674C" : "none",
|
|
75
|
+
backgroundColor: record.Status === "Draft" ? "#FF674C" : "none"
|
|
76
|
+
},
|
|
77
|
+
};
|
|
78
|
+
}}
|
|
70
79
|
columnsSortChange={handleSortByColumnChange} paginationInfo={setPageInfo} headingTranslationsKey={'tableHeadings'} rowSelectionInfo={setRowSelectionInfo}
|
|
71
80
|
actionsArray={actionsArray}
|
|
72
81
|
fixedColumns={[{ dataIndex: 'action', side: 'right' }]} buttonActionIcon={getIcon} {...args}>
|
|
@@ -94,7 +103,7 @@ Primary.args = {
|
|
|
94
103
|
store: `Levi's Sta Catarina`,
|
|
95
104
|
role: `Comercial`,
|
|
96
105
|
type: `NEfetivo`,
|
|
97
|
-
Status: "
|
|
106
|
+
Status: "Draft"
|
|
98
107
|
},
|
|
99
108
|
{
|
|
100
109
|
id: `3`,
|
|
@@ -357,6 +357,25 @@ export const ResponsiveTable = (props: ResponsiveTableCustomProps) => {
|
|
|
357
357
|
}
|
|
358
358
|
) : null}
|
|
359
359
|
rowKey={rowKeyValue}
|
|
360
|
+
onRow={(record: any) => {
|
|
361
|
+
const internalRow = {
|
|
362
|
+
style: {
|
|
363
|
+
opacity: (record.Status === "I" || record.Status === "Draft") ? 0.5 : 1,
|
|
364
|
+
boxShadow: record.Status === "Draft" ? "inset 2px 0 0 #FF674C" : "none",
|
|
365
|
+
},
|
|
366
|
+
};
|
|
367
|
+
|
|
368
|
+
const externalRow = props.onRow?.(record) ?? {};
|
|
369
|
+
|
|
370
|
+
return {
|
|
371
|
+
...externalRow,
|
|
372
|
+
...internalRow,
|
|
373
|
+
style: {
|
|
374
|
+
...internalRow.style,
|
|
375
|
+
...externalRow.style,
|
|
376
|
+
},
|
|
377
|
+
};
|
|
378
|
+
}}
|
|
360
379
|
{...(tableMaxHeight ? { scroll: { y: tableMaxHeight } } : {})}
|
|
361
380
|
/>
|
|
362
381
|
{
|