@onehat/ui 0.3.328 → 0.3.330

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onehat/ui",
3
- "version": "0.3.328",
3
+ "version": "0.3.330",
4
4
  "description": "Base UI for OneHat apps",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
@@ -232,6 +232,9 @@ function GridComponent(props) {
232
232
  id: column.id,
233
233
  isHidden: !!column.isHidden,
234
234
  };
235
+ if (column.w) {
236
+ localConfig[ix].w = column.w;
237
+ }
235
238
  });
236
239
  }
237
240
  setSaved(localColumnsConfigKey, localConfig);
@@ -864,7 +867,7 @@ function GridComponent(props) {
864
867
  // This should allow us to continue using non-serializable configurations after a refresh
865
868
  const reconstructedLocalColumnsConfig = savedLocalColumnsConfig.map((savedConfig) => { // foreach saved column, in the order it was saved...
866
869
  const columnConfig = localColumnsConfig.find(localConfig => localConfig.id === savedConfig.id); // find the corresponding column in localColumnsConfig
867
- columnConfig.isHidden = savedConfig.isHidden;
870
+ _.assign(columnConfig, savedConfig);
868
871
  return columnConfig;
869
872
  });
870
873
  localColumnsConfig = reconstructedLocalColumnsConfig;
@@ -23,6 +23,7 @@ import inArray from '../../Functions/inArray.js';
23
23
  import IconButton from '../../Components/Buttons/IconButton.js';
24
24
  import Xmark from '../../Components/Icons/Xmark.js'
25
25
  import withAlert from '../../Components/Hoc/withAlert.js';
26
+ import withComponent from '../../Components/Hoc/withComponent.js';
26
27
  import withData from '../../Components/Hoc/withData.js';
27
28
  import downloadInBackground from '../../Functions/downloadInBackground.js';
28
29
  import downloadWithFetch from '../../Functions/downloadWithFetch.js';
@@ -88,6 +89,9 @@ function AttachmentsElement(props) {
88
89
  autoUpload = true,
89
90
  onBeforeDropzoneChange,
90
91
 
92
+ // withComponent
93
+ self,
94
+
91
95
  // parentContainer
92
96
  selectorSelected,
93
97
 
@@ -274,7 +278,10 @@ function AttachmentsElement(props) {
274
278
  if (!isReady) {
275
279
  return null;
276
280
  }
277
-
281
+
282
+ if (self) {
283
+ self.files = files;
284
+ }
278
285
 
279
286
  if (canCrud) {
280
287
  _fileMosaic.onDelete = onFileDelete;
@@ -363,4 +370,4 @@ function withAdditionalProps(WrappedComponent) {
363
370
  };
364
371
  }
365
372
 
366
- export default withAdditionalProps(withAlert(withData(AttachmentsElement)));
373
+ export default withComponent(withAdditionalProps(withAlert(withData(AttachmentsElement))));