@panneau/medias 3.0.228 → 3.0.236

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 +4 -3
  2. package/package.json +3 -3
package/es/index.js CHANGED
@@ -969,9 +969,6 @@ function MediasBrowser(_ref) {
969
969
  _useState4 = _slicedToArray(_useState3, 2),
970
970
  showTrashed = _useState4[0],
971
971
  setShowTrashed = _useState4[1];
972
- var onClickTrash = useCallback(function () {
973
- setShowTrashed(!showTrashed);
974
- }, [showTrashed, setShowTrashed]);
975
972
  var _useMedias = useMedias$1(query, page, count, {
976
973
  items: baseItems,
977
974
  trashed: showTrashed
@@ -991,6 +988,10 @@ function MediasBrowser(_ref) {
991
988
  _useMedias$pages = _useMedias.pages,
992
989
  pages = _useMedias$pages === void 0 ? null : _useMedias$pages,
993
990
  reload = _useMedias.reload;
991
+ var onClickTrash = useCallback(function () {
992
+ setShowTrashed(!showTrashed);
993
+ reload(); // dirty fix to bypass global query caching
994
+ }, [showTrashed, setShowTrashed]);
994
995
  useEffect(function () {
995
996
  if (onItemsChange !== null) {
996
997
  onItemsChange(items);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@panneau/medias",
3
- "version": "3.0.228",
3
+ "version": "3.0.236",
4
4
  "description": "",
5
5
  "keywords": [
6
6
  "javascript"
@@ -64,7 +64,7 @@
64
64
  "@panneau/element-media-player": "^3.0.228",
65
65
  "@panneau/element-pagination": "^3.0.228",
66
66
  "@panneau/element-table": "^3.0.228",
67
- "@panneau/field-upload": "^3.0.228",
67
+ "@panneau/field-upload": "^3.0.231",
68
68
  "@panneau/filter-filters": "^3.0.228",
69
69
  "classnames": "^2.5.1",
70
70
  "lodash": "^4.17.21",
@@ -74,5 +74,5 @@
74
74
  "publishConfig": {
75
75
  "access": "public"
76
76
  },
77
- "gitHead": "2adf72884fb88052c6a6822e6f32169bb1dfe18b"
77
+ "gitHead": "ecc62ef2978ca750b7c6ef500ab7f6397ec2b550"
78
78
  }