1
0
Fork 0
mirror of synced 2024-07-11 09:15:48 +12:00

Disable live binding eval when no context is provided

This commit is contained in:
Andrew Kingston 2024-02-27 12:55:48 +00:00
parent 6bb3c76d1d
commit 9450c5b770
2 changed files with 8 additions and 4 deletions

View file

@ -69,7 +69,9 @@
$: drawerContext?.modal.subscribe(val => (drawerIsModal = val))
$: editorTabs = allowJS ? [Modes.Text, Modes.JavaScript] : [Modes.Text]
$: sideTabs = [SidePanels.Evaluation, SidePanels.Bindings]
$: sideTabs = context
? [SidePanels.Evaluation, SidePanels.Bindings]
: [SidePanels.Bindings]
$: enrichedBindings = enrichBindings(bindings, context)
$: usingJS = mode === Modes.JavaScript
$: editorMode =

View file

@ -1,9 +1,8 @@
<script>
import groupBy from "lodash/fp/groupBy"
import { convertToJS, processStringSync } from "@budibase/string-templates"
import { Input, Layout, ActionButton, Icon, Popover } from "@budibase/bbui"
import { convertToJS } from "@budibase/string-templates"
import { Input, Layout, Icon, Popover } from "@budibase/bbui"
import { handlebarsCompletions } from "constants/completions"
import formatHighlight from "json-format-highlight"
export let addHelper
export let addBinding
@ -72,6 +71,9 @@
}
const showBindingPopover = (binding, target) => {
if (!context) {
return
}
stopHidingPopover()
popoverAnchor = target
hoverTarget = {