@topconsultnpm/sdkui-react 6.20.0-dev3.14 → 6.20.0-dev3.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.
@@ -78,10 +78,20 @@ const TMMetadataValues = ({ showCheckBoxes = ShowCheckBoxesMode.Never, checkPerm
78
78
  setDynDataListsToBeRefreshed([]);
79
79
  return;
80
80
  }
81
- // Passiamo did = undefined, perché è già in cache
82
- DcmtTypeListCacheService.GetWithNotGrantedAsync(TID, undefined).then((resultDTD) => {
83
- setCurrentDTD(resultDTD);
84
- });
81
+ const fetchData = async () => {
82
+ try {
83
+ let resultDTD = await DcmtTypeListCacheService.GetAsync(TID);
84
+ if (!resultDTD) {
85
+ // Passiamo did = undefined, perché è già in cache
86
+ resultDTD = await DcmtTypeListCacheService.GetWithNotGrantedAsync(TID, undefined);
87
+ }
88
+ setCurrentDTD(resultDTD);
89
+ }
90
+ catch (error) {
91
+ TMExceptionBoxManager.show({ exception: error });
92
+ }
93
+ };
94
+ fetchData();
85
95
  }, [TID]);
86
96
  useEffect(() => {
87
97
  if (metadataValues.length <= 0)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@topconsultnpm/sdkui-react",
3
- "version": "6.20.0-dev3.14",
3
+ "version": "6.20.0-dev3.15",
4
4
  "description": "",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1",