@steroidsjs/core 2.2.81 → 2.2.82
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/hooks/useDataProvider.js +7 -0
- package/hooks/useFile.js +4 -0
- package/package.json +1 -1
package/hooks/useDataProvider.js
CHANGED
|
@@ -105,6 +105,13 @@ function useDataProvider(config) {
|
|
|
105
105
|
setSourceInternalItems(value);
|
|
106
106
|
}
|
|
107
107
|
}, [reduxDataProviderId, dispatch]);
|
|
108
|
+
// Check change items from props
|
|
109
|
+
var prevInitialItems = react_use_1.usePrevious(initialItems);
|
|
110
|
+
react_1.useEffect(function () {
|
|
111
|
+
if (prevInitialItems && !isEqual_1["default"](prevInitialItems, initialItems)) {
|
|
112
|
+
setSourceInternalItems(initialItems);
|
|
113
|
+
}
|
|
114
|
+
}, [prevInitialItems, initialItems]);
|
|
108
115
|
// Normalize autoComplete
|
|
109
116
|
var autoComplete = react_1.useMemo(function () { return (__assign(__assign({}, defaultProps.autoComplete), (typeof config.autoComplete === 'boolean') ? { enable: config.autoComplete } : config.autoComplete)); }, [config.autoComplete]);
|
|
110
117
|
var dataProvider = react_1.useMemo(function () { return (__assign({ action: '', actionMethod: 'get', params: null, onSearch: null }, config.dataProvider)); }, [config.dataProvider]);
|
package/hooks/useFile.js
CHANGED
|
@@ -30,6 +30,10 @@ var imagesMimeTypes = [
|
|
|
30
30
|
'image/jpeg',
|
|
31
31
|
'image/pjpeg',
|
|
32
32
|
'image/png',
|
|
33
|
+
'image/heif',
|
|
34
|
+
'image/heic',
|
|
35
|
+
'image/heif-sequence',
|
|
36
|
+
'image/heic-sequence',
|
|
33
37
|
];
|
|
34
38
|
function generateBackendUrl(props) {
|
|
35
39
|
return buildURL_1["default"](props.backendUrl, {
|