@budibase/bbui 3.12.0 → 3.12.2

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": "3.12.0",
4
+ "version": "3.12.2",
5
5
  "license": "MPL-2.0",
6
6
  "svelte": "src/index.ts",
7
7
  "module": "dist/bbui.mjs",
@@ -99,5 +99,5 @@
99
99
  }
100
100
  }
101
101
  },
102
- "gitHead": "4d3f7719ab1ae02d3d01908b8a14a31a0c81445d"
102
+ "gitHead": "d3c6f03610ea1c975989145b29f32930d70c7253"
103
103
  }
@@ -17,11 +17,23 @@
17
17
  export let autocomplete: boolean | string | undefined = undefined
18
18
  export let helpText: string | undefined = undefined
19
19
 
20
- const dispatch = createEventDispatcher()
20
+ const dispatch = createEventDispatcher<{
21
+ change: any
22
+ enterkey: KeyboardEvent
23
+ }>()
21
24
  const onChange = (e: any) => {
22
25
  value = e.detail
23
26
  dispatch("change", e.detail)
24
27
  }
28
+
29
+ const onKeyDown = (e: KeyboardEvent) => {
30
+ if (readonly || disabled) {
31
+ return
32
+ }
33
+ if (e.key === "Enter") {
34
+ dispatch("enterkey", e)
35
+ }
36
+ }
25
37
  </script>
26
38
 
27
39
  <Field {helpText} {label} {labelPosition} {error}>
@@ -42,6 +54,7 @@
42
54
  on:focus
43
55
  on:keyup
44
56
  on:keydown
57
+ on:keydown={onKeyDown}
45
58
  >
46
59
  <slot />
47
60
  </TextField>
@@ -19,7 +19,7 @@
19
19
  ref.innerHTML = ""
20
20
  return
21
21
  }
22
- ref.innerHTML = marked.parse(markdown)
22
+ ref.innerHTML = marked.parse(markdown, { async: false })
23
23
  }
24
24
  </script>
25
25