@visns-studio/visns-components 5.11.13 → 5.11.15
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 +1 -1
- package/src/components/crm/DataGrid.jsx +10 -40
package/package.json
CHANGED
|
@@ -87,7 +87,7 @@
|
|
|
87
87
|
"react-dom": "^17.0.0 || ^18.0.0"
|
|
88
88
|
},
|
|
89
89
|
"name": "@visns-studio/visns-components",
|
|
90
|
-
"version": "5.11.
|
|
90
|
+
"version": "5.11.15",
|
|
91
91
|
"description": "Various packages to assist in the development of our Custom Applications.",
|
|
92
92
|
"main": "src/index.js",
|
|
93
93
|
"files": [
|
|
@@ -867,44 +867,15 @@ const DataGrid = forwardRef(
|
|
|
867
867
|
case 'file':
|
|
868
868
|
case 'image':
|
|
869
869
|
case 'undo':
|
|
870
|
-
//
|
|
871
|
-
|
|
872
|
-
s.
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
if (itemName) {
|
|
880
|
-
message += ` Item: "${itemName}"`;
|
|
881
|
-
}
|
|
882
|
-
|
|
883
|
-
// Show confirmation dialog
|
|
884
|
-
confirmDialog({
|
|
885
|
-
title: actionName,
|
|
886
|
-
message: message,
|
|
887
|
-
data: d, // Pass the row data for context
|
|
888
|
-
buttons: [
|
|
889
|
-
{
|
|
890
|
-
label: 'Yes',
|
|
891
|
-
onClick: () => {
|
|
892
|
-
CustomFetch(
|
|
893
|
-
s.url,
|
|
894
|
-
'POST',
|
|
895
|
-
{ id: d[s.key] },
|
|
896
|
-
(result) => {
|
|
897
|
-
toast.success(result.message);
|
|
898
|
-
}
|
|
899
|
-
);
|
|
900
|
-
},
|
|
901
|
-
},
|
|
902
|
-
{
|
|
903
|
-
label: 'No',
|
|
904
|
-
onClick: () => {},
|
|
905
|
-
},
|
|
906
|
-
],
|
|
907
|
-
});
|
|
870
|
+
// Execute the action directly since confirmation was already handled
|
|
871
|
+
CustomFetch(
|
|
872
|
+
s.url,
|
|
873
|
+
'POST',
|
|
874
|
+
{ id: d[s.key] },
|
|
875
|
+
(result) => {
|
|
876
|
+
toast.success(result.message);
|
|
877
|
+
}
|
|
878
|
+
);
|
|
908
879
|
break;
|
|
909
880
|
case 'clone':
|
|
910
881
|
if (s.url && s.url !== '') {
|
|
@@ -2855,7 +2826,7 @@ const DataGrid = forwardRef(
|
|
|
2855
2826
|
.catch((error) => {
|
|
2856
2827
|
console.error('Error in fetching dropdown data: ', error);
|
|
2857
2828
|
});
|
|
2858
|
-
}, [columns, filterDataSource
|
|
2829
|
+
}, [columns, filterDataSource]);
|
|
2859
2830
|
|
|
2860
2831
|
useEffect(() => {
|
|
2861
2832
|
if (setFilterData) {
|
|
@@ -3101,7 +3072,6 @@ const DataGrid = forwardRef(
|
|
|
3101
3072
|
{...tableSetting}
|
|
3102
3073
|
columns={gridColumns}
|
|
3103
3074
|
dataSource={dataSource}
|
|
3104
|
-
defaultFilterValue={filterValue}
|
|
3105
3075
|
{...(ajaxSetting && ajaxSetting.groupBy
|
|
3106
3076
|
? {
|
|
3107
3077
|
defaultGroupBy: ajaxSetting.groupBy,
|