Fix new column button layout and remove logs
This commit is contained in:
parent
e05c46435f
commit
6acffc7e64
|
@ -3,13 +3,13 @@
|
||||||
import { Icon } from "@budibase/bbui"
|
import { Icon } from "@budibase/bbui"
|
||||||
import GridPopover from "../overlays/GridPopover.svelte"
|
import GridPopover from "../overlays/GridPopover.svelte"
|
||||||
|
|
||||||
const { visibleColumns, scroll, width, subscribe, ui, keyboardBlocked } =
|
const { scrollableColumns, scroll, width, subscribe, ui, keyboardBlocked } =
|
||||||
getContext("grid")
|
getContext("grid")
|
||||||
|
|
||||||
let anchor
|
let anchor
|
||||||
let isOpen = false
|
let isOpen = false
|
||||||
|
|
||||||
$: columnsWidth = $visibleColumns.reduce(
|
$: columnsWidth = $scrollableColumns.reduce(
|
||||||
(total, col) => (total += col.width),
|
(total, col) => (total += col.width),
|
||||||
0
|
0
|
||||||
)
|
)
|
||||||
|
@ -43,7 +43,7 @@
|
||||||
{#if isOpen}
|
{#if isOpen}
|
||||||
<GridPopover
|
<GridPopover
|
||||||
{anchor}
|
{anchor}
|
||||||
align={$visibleColumns.length ? "right" : "left"}
|
align={$scrollableColumns.length ? "right" : "left"}
|
||||||
on:close={close}
|
on:close={close}
|
||||||
maxHeight={null}
|
maxHeight={null}
|
||||||
resizable
|
resizable
|
||||||
|
|
|
@ -21,7 +21,6 @@
|
||||||
$: visible = $isReordering && left >= $bodyLeft
|
$: visible = $isReordering && left >= $bodyLeft
|
||||||
|
|
||||||
const getLeft = (targetColumn, insertAfter, scrollLeft) => {
|
const getLeft = (targetColumn, insertAfter, scrollLeft) => {
|
||||||
console.log(targetColumn)
|
|
||||||
if (!targetColumn) {
|
if (!targetColumn) {
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue