@panneau/medias 3.0.256 → 3.0.258

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.
Files changed (2) hide show
  1. package/es/index.js +8 -2
  2. package/package.json +2 -2
package/es/index.js CHANGED
@@ -1135,11 +1135,16 @@ function MediasBrowser(_ref) {
1135
1135
  firstMedia = _ref8$ === void 0 ? null : _ref8$;
1136
1136
  onSelectionChange(multipleSelection && isArray(newMedias) ? newMedias : firstMedia);
1137
1137
  onQueryReset();
1138
- reload();
1138
+ reload().then(function () {
1139
+ setUploadedMedias(null);
1140
+ });
1139
1141
  }
1140
1142
  }, [onSelectionChange, setUploadedMedias, uploadedMedias, onQueryReset, reload, multipleSelection]);
1141
1143
  var onUploadComplete = useCallback(function () {
1142
1144
  var medias = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
1145
+ if (showTrashed) {
1146
+ setShowTrashed(false);
1147
+ }
1143
1148
  if (medias === null) return;
1144
1149
  var rawMedias = (isArray(medias) ? medias : [medias]).filter(function (it) {
1145
1150
  return it !== null;
@@ -1181,6 +1186,7 @@ function MediasBrowser(_ref) {
1181
1186
  outline: !showTrashed,
1182
1187
  activeTheme: 'danger',
1183
1188
  icon: showTrashed ? 'trash-fill' : 'trash',
1189
+ disabled: uploadProcessing,
1184
1190
  onClick: onClickTrash
1185
1191
  }]) : filters;
1186
1192
  if (types !== null && partialFilters !== null) {
@@ -1194,7 +1200,7 @@ function MediasBrowser(_ref) {
1194
1200
  });
1195
1201
  }
1196
1202
  return partialFilters;
1197
- }, [filters, types, withTrash, showTrashed, onClickTrash]);
1203
+ }, [filters, types, withTrash, showTrashed, uploadProcessing, onClickTrash]);
1198
1204
  var partialColumns = useMemo(function () {
1199
1205
  return withTrash && showTrashed ? (columns || []).map(function (column) {
1200
1206
  var _ref10 = column || {},
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@panneau/medias",
3
- "version": "3.0.256",
3
+ "version": "3.0.258",
4
4
  "description": "",
5
5
  "keywords": [
6
6
  "javascript"
@@ -74,5 +74,5 @@
74
74
  "publishConfig": {
75
75
  "access": "public"
76
76
  },
77
- "gitHead": "d841aee21fa1e406ed2674e9f7fb5622d185b05c"
77
+ "gitHead": "60ef90c9ddd69bb1d89670f6ada74ad14f83fb70"
78
78
  }