@steroidsjs/core 2.2.28 → 2.2.29
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/useFile.js +2 -2
- package/package.json +1 -1
package/hooks/useFile.js
CHANGED
|
@@ -173,13 +173,13 @@ function useFile(props) {
|
|
|
173
173
|
//todo refactoring
|
|
174
174
|
react_1.useEffect(function () {
|
|
175
175
|
if (prevInputValue && !isEqual_1["default"](prevInputValue !== props.input.value)) {
|
|
176
|
-
var toRemove_1 = difference_1["default"]([].concat(
|
|
176
|
+
var toRemove_1 = difference_1["default"]([].concat(prevInputValue || []), [].concat(props.input.value || []));
|
|
177
177
|
if (toRemove_1.length > 0) {
|
|
178
178
|
uploader.queue.remove(uploader.queue.getFiles().filter(function (file) { return (toRemove_1.indexOf(get_1["default"](file.getResultHttpMessage(), 'id')) !== -1); }));
|
|
179
179
|
}
|
|
180
180
|
}
|
|
181
181
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
182
|
-
}, [prevInputValue]);
|
|
182
|
+
}, [prevInputValue, props.input.value]);
|
|
183
183
|
/**
|
|
184
184
|
* Show browse dialog in user browser
|
|
185
185
|
* @param {object} event
|