Ensure CodeMirror hints are rendered on top of modals
This commit is contained in:
parent
19d74d3fb6
commit
46bb498122
|
@ -1,6 +1,4 @@
|
||||||
<script context="module">
|
<script context="module">
|
||||||
import { Label } from "@budibase/bbui"
|
|
||||||
|
|
||||||
export const EditorModes = {
|
export const EditorModes = {
|
||||||
JS: {
|
JS: {
|
||||||
name: "javascript",
|
name: "javascript",
|
||||||
|
@ -21,6 +19,7 @@
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import { Label } from "@budibase/bbui"
|
||||||
import CodeMirror from "components/integration/codemirror"
|
import CodeMirror from "components/integration/codemirror"
|
||||||
import { themeStore } from "builderStore"
|
import { themeStore } from "builderStore"
|
||||||
import { createEventDispatcher, onMount } from "svelte"
|
import { createEventDispatcher, onMount } from "svelte"
|
||||||
|
@ -156,4 +155,9 @@
|
||||||
div :global(.CodeMirror-focused) {
|
div :global(.CodeMirror-focused) {
|
||||||
border-color: var(--spectrum-alias-border-color-mouse-focus);
|
border-color: var(--spectrum-alias-border-color-mouse-focus);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Ensure hints are always on top */
|
||||||
|
:global(.CodeMirror-hints) {
|
||||||
|
z-index: 999999;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -49,6 +49,7 @@
|
||||||
$: filteredHelpers = helpers?.filter(helper => {
|
$: filteredHelpers = helpers?.filter(helper => {
|
||||||
return helper.label.match(searchRgx) || helper.description.match(searchRgx)
|
return helper.label.match(searchRgx) || helper.description.match(searchRgx)
|
||||||
})
|
})
|
||||||
|
$: codeMirrorHints = bindings?.map(x => `$("${x.readableBinding}")`)
|
||||||
|
|
||||||
const updateValue = value => {
|
const updateValue = value => {
|
||||||
valid = isValid(readableToRuntimeBinding(bindings, value))
|
valid = isValid(readableToRuntimeBinding(bindings, value))
|
||||||
|
@ -178,7 +179,7 @@
|
||||||
height={200}
|
height={200}
|
||||||
value={decodeJSBinding(jsValue)}
|
value={decodeJSBinding(jsValue)}
|
||||||
on:change={onChangeJSValue}
|
on:change={onChangeJSValue}
|
||||||
hints={bindings?.map(x => `$("${x.readableBinding}")`)}
|
hints={codeMirrorHints}
|
||||||
/>
|
/>
|
||||||
<Body size="S">
|
<Body size="S">
|
||||||
JavaScript expressions are executed as functions, so ensure that
|
JavaScript expressions are executed as functions, so ensure that
|
||||||
|
|
Loading…
Reference in New Issue