@onehat/ui 0.2.61 → 0.2.63

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.2.61",
3
+ "version": "0.2.63",
4
4
  "description": "Base UI for OneHat apps",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
@@ -25,12 +25,12 @@
25
25
  },
26
26
  "license": "UNLICENSED",
27
27
  "dependencies": {
28
- "@onehat/data": "^1.17.3",
29
- "@hookform/resolvers": "^3.1.0",
28
+ "@onehat/data": "^1.18.0",
29
+ "@hookform/resolvers": "^3.1.1",
30
30
  "@k-renwick/colour-mixer": "^1.2.1",
31
31
  "js-cookie": "^3.0.5",
32
32
  "native-base": "^3.4.28",
33
- "react-hook-form": "^7.44.3",
33
+ "react-hook-form": "^7.45.0",
34
34
  "yup": "^1.2.0"
35
35
  },
36
36
  "peerDependencies": {
@@ -58,14 +58,17 @@ export default function withEditor(WrappedComponent) {
58
58
  }
59
59
 
60
60
  // Set repository to sort by id DESC and switch to page 1, so this new entity is guaranteed to show up on the current page, even after saving
61
- Repository.pauseEvents();
62
- Repository.sort(Repository.schema.model.idProperty, 'DESC');
63
- Repository.setPage(1);
64
- Repository.resumeEvents();
65
- await Repository.reload();
61
+ const currentSorter = Repository.sorters[0];
62
+ if (currentSorter.name !== Repository.schema.model.idProperty || currentSorter.direction !== 'DESC') {
63
+ Repository.pauseEvents();
64
+ Repository.sort(Repository.schema.model.idProperty, 'DESC');
65
+ Repository.setPage(1);
66
+ Repository.resumeEvents();
67
+ await Repository.reload();
68
+ }
66
69
 
67
70
  const entity = await Repository.add(addValues, false, true, true);
68
- setSelection([entity]);
71
+ setSelection([entity]);
69
72
  setIsEditorViewOnly(false);
70
73
  setEditorMode(EDITOR_MODE__ADD);
71
74
  setIsEditorShown(true);
@@ -1,5 +1,5 @@
1
1
  import UiGlobals from '../UiGlobals.js';
2
- import CKEditor from '../Components/Form/Field/CKEditor/CKEditor.js';
2
+ // import CKEditor from '../Components/Form/Field/CKEditor/CKEditor.js';
3
3
  import Datetime from '../PlatformImports/Web/Datetime.js';
4
4
  import Draggable from '../PlatformImports/Web/Draggable.js';
5
5
  import File from '../Components/Form/Field/File.js';
@@ -7,7 +7,7 @@ import _ from 'lodash';
7
7
 
8
8
  export default function registerWebComponents() {
9
9
  _.merge(UiGlobals.components, {
10
- CKEditor,
10
+ // CKEditor, // The CKEditor was giving me CSS import errors, so had to disable it until I can fix those
11
11
  Datetime,
12
12
  Draggable,
13
13
  File,