Merge pull request #14129 from Budibase/fix/create-view-always
Always allow creating views
This commit is contained in:
commit
aba4d02a84
|
@ -3,12 +3,11 @@
|
||||||
import { Modal, ActionButton, TooltipType, TempTooltip } from "@budibase/bbui"
|
import { Modal, ActionButton, TooltipType, TempTooltip } from "@budibase/bbui"
|
||||||
import GridCreateViewModal from "../../modals/grid/GridCreateViewModal.svelte"
|
import GridCreateViewModal from "../../modals/grid/GridCreateViewModal.svelte"
|
||||||
|
|
||||||
const { rows, columns, filter } = getContext("grid")
|
const { filter } = getContext("grid")
|
||||||
|
|
||||||
let modal
|
let modal
|
||||||
let firstFilterUsage = false
|
let firstFilterUsage = false
|
||||||
|
|
||||||
$: disabled = !$columns.length || !$rows.length
|
|
||||||
$: {
|
$: {
|
||||||
if ($filter?.length && !firstFilterUsage) {
|
if ($filter?.length && !firstFilterUsage) {
|
||||||
firstFilterUsage = true
|
firstFilterUsage = true
|
||||||
|
@ -21,7 +20,7 @@
|
||||||
type={TooltipType.Info}
|
type={TooltipType.Info}
|
||||||
condition={firstFilterUsage}
|
condition={firstFilterUsage}
|
||||||
>
|
>
|
||||||
<ActionButton {disabled} icon="CollectionAdd" quiet on:click={modal.show}>
|
<ActionButton icon="CollectionAdd" quiet on:click={modal.show}>
|
||||||
Create view
|
Create view
|
||||||
</ActionButton>
|
</ActionButton>
|
||||||
</TempTooltip>
|
</TempTooltip>
|
||||||
|
|
Loading…
Reference in New Issue