@visns-studio/visns-components 3.3.6 → 3.3.7
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/components/crm/DataGrid.jsx +17 -2
- package/package.json +1 -1
|
@@ -1494,14 +1494,29 @@ const DataGrid = forwardRef(
|
|
|
1494
1494
|
filterEditor: filterEditor,
|
|
1495
1495
|
filterEditorProps: filterEditorProps,
|
|
1496
1496
|
render: ({ data }) => {
|
|
1497
|
+
let newData;
|
|
1498
|
+
|
|
1497
1499
|
if (
|
|
1498
1500
|
data &&
|
|
1499
1501
|
column.options &&
|
|
1500
1502
|
column.options[data[column.id]]
|
|
1501
1503
|
) {
|
|
1502
|
-
|
|
1504
|
+
if (
|
|
1505
|
+
column.key &&
|
|
1506
|
+
data[column.key] > 0 &&
|
|
1507
|
+
column.options[
|
|
1508
|
+
data[column.id]
|
|
1509
|
+
].includes('#')
|
|
1510
|
+
) {
|
|
1511
|
+
newData = column.options[
|
|
1512
|
+
data[column.id]
|
|
1513
|
+
].replace(/#/g, data[column.key]);
|
|
1514
|
+
} else {
|
|
1515
|
+
newData =
|
|
1516
|
+
column.options[data[column.id]];
|
|
1517
|
+
}
|
|
1503
1518
|
|
|
1504
|
-
return <span>{
|
|
1519
|
+
return <span>{newData}</span>;
|
|
1505
1520
|
} else {
|
|
1506
1521
|
return null;
|
|
1507
1522
|
}
|
package/package.json
CHANGED