@miso.ai/client-sdk-ui 1.13.0-beta.0 → 1.13.0-beta.1

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.
@@ -4,4 +4,4 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
- var _default = exports.default = '1.13.0-beta.0';
7
+ var _default = exports.default = '1.13.0-beta.1';
@@ -41,17 +41,21 @@ function autoQuery(options = {}) {
41
41
  const searchParams = new URLSearchParams(window.location.search);
42
42
  const q = searchParams.get(param);
43
43
  const qs = searchParams.get(sourceParam) || undefined;
44
- for (const view of this._views.getAll(_constants.ROLE.QUERY)) {
45
- const {
46
- layout
47
- } = view;
48
- if (q && setValue) {
49
- layout.value = q;
50
- }
51
- if (!q && focus) {
52
- layout.focus();
44
+
45
+ // because it's probably not there yet, but this is an ad-hoc solution
46
+ setTimeout(() => {
47
+ for (const view of this._views.getAll(_constants.ROLE.QUERY)) {
48
+ const {
49
+ layout
50
+ } = view;
51
+ if (q && setValue) {
52
+ layout.value = q;
53
+ }
54
+ if (!q && focus) {
55
+ layout.focus();
56
+ }
53
57
  }
54
- }
58
+ });
55
59
  if (q) {
56
60
  this.query((0, _commons.trimObj)({
57
61
  q,
package/package.json CHANGED
@@ -26,7 +26,7 @@
26
26
  "url": "https://github.com/MisoAI/miso-client-js-sdk/issues"
27
27
  },
28
28
  "dependencies": {
29
- "@miso.ai/commons": "1.13.0-beta.0"
29
+ "@miso.ai/commons": "1.13.0-beta.1"
30
30
  },
31
- "version": "1.13.0-beta.0"
31
+ "version": "1.13.0-beta.1"
32
32
  }
package/src/version.js CHANGED
@@ -1 +1 @@
1
- export default '1.13.0-beta.0';
1
+ export default '1.13.0-beta.1';
@@ -22,15 +22,18 @@ export function autoQuery(options = {}) {
22
22
  const q = searchParams.get(param);
23
23
  const qs = searchParams.get(sourceParam) || undefined;
24
24
 
25
- for (const view of this._views.getAll(ROLE.QUERY)) {
26
- const { layout } = view;
27
- if (q && setValue) {
28
- layout.value = q;
25
+ // because it's probably not there yet, but this is an ad-hoc solution
26
+ setTimeout(() => {
27
+ for (const view of this._views.getAll(ROLE.QUERY)) {
28
+ const { layout } = view;
29
+ if (q && setValue) {
30
+ layout.value = q;
31
+ }
32
+ if (!q && focus) {
33
+ layout.focus();
34
+ }
29
35
  }
30
- if (!q && focus) {
31
- layout.focus();
32
- }
33
- }
36
+ });
34
37
 
35
38
  if (q) {
36
39
  this.query(trimObj({ q, qs }));