@budibase/bbui 0.9.168 → 0.9.169-alpha.3

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,7 +1,7 @@
1
1
  {
2
2
  "name": "@budibase/bbui",
3
3
  "description": "A UI solution used in the different Budibase projects.",
4
- "version": "0.9.168",
4
+ "version": "0.9.169-alpha.3",
5
5
  "license": "AGPL-3.0",
6
6
  "svelte": "src/index.js",
7
7
  "module": "dist/bbui.es.js",
@@ -81,5 +81,5 @@
81
81
  "svelte-flatpickr": "^3.2.3",
82
82
  "svelte-portal": "^1.0.0"
83
83
  },
84
- "gitHead": "6d8f7f1220440f0e1601005e31da376ff44c28df"
84
+ "gitHead": "b6f6aacfacb83ca249adbc5f363ceade485262d2"
85
85
  }
@@ -5,6 +5,7 @@
5
5
  import RelationshipRenderer from "./RelationshipRenderer.svelte"
6
6
  import AttachmentRenderer from "./AttachmentRenderer.svelte"
7
7
  import ArrayRenderer from "./ArrayRenderer.svelte"
8
+ import InternalRenderer from "./InternalRenderer.svelte"
8
9
 
9
10
  export let row
10
11
  export let schema
@@ -22,8 +23,8 @@
22
23
  number: StringRenderer,
23
24
  longform: StringRenderer,
24
25
  array: ArrayRenderer,
26
+ internal: InternalRenderer,
25
27
  }
26
-
27
28
  $: type = schema?.type ?? "string"
28
29
  $: customRenderer = customRenderers?.find(x => x.column === schema?.name)
29
30
  $: renderer = customRenderer?.component ?? typeMap[type] ?? StringRenderer
@@ -8,11 +8,19 @@
8
8
  const selected = getContext("tab")
9
9
  let tab
10
10
  let tabInfo
11
+
11
12
  const setTabInfo = () => {
12
- tabInfo = tab.getBoundingClientRect()
13
- if ($selected.title === title) {
14
- $selected.info = tabInfo
15
- }
13
+ // If the tabs are being rendered inside a component which uses
14
+ // a svelte transition to enter, then this initial getBoundingClientRect
15
+ // will return an incorrect position.
16
+ // We just need to get this off the main thread to fix this, by using
17
+ // a 0ms timeout.
18
+ setTimeout(() => {
19
+ tabInfo = tab.getBoundingClientRect()
20
+ if ($selected.title === title) {
21
+ $selected.info = tabInfo
22
+ }
23
+ }, 0)
16
24
  }
17
25
 
18
26
  onMount(() => {