Rename date picker flag to be more meaningful and ensure action menus never shrink
This commit is contained in:
parent
ddbb6765ef
commit
8f058756c3
|
@ -38,7 +38,15 @@
|
|||
<div use:getAnchor on:click={openMenu}>
|
||||
<slot name="control" />
|
||||
</div>
|
||||
<Popover bind:this={dropdown} {anchor} {align} {portalTarget} on:open on:close>
|
||||
<Popover
|
||||
bind:this={dropdown}
|
||||
{anchor}
|
||||
{align}
|
||||
{portalTarget}
|
||||
resizable={false}
|
||||
on:open
|
||||
on:close
|
||||
>
|
||||
<Menu>
|
||||
<slot />
|
||||
</Menu>
|
||||
|
|
|
@ -38,7 +38,7 @@ export default function positionDropdown(element, opts) {
|
|||
useAnchorWidth,
|
||||
offset = 5,
|
||||
customUpdate,
|
||||
fitToScreen,
|
||||
resizable,
|
||||
wrap,
|
||||
} = opts
|
||||
if (!anchor) {
|
||||
|
@ -82,7 +82,7 @@ export default function positionDropdown(element, opts) {
|
|||
|
||||
// Applies a dynamic max height constraint if appropriate
|
||||
const applyMaxHeight = height => {
|
||||
if (!styles.maxHeight && fitToScreen) {
|
||||
if (!styles.maxHeight && resizable) {
|
||||
styles.maxHeight = height
|
||||
}
|
||||
}
|
||||
|
|
|
@ -68,7 +68,7 @@
|
|||
portalTarget={appendTo}
|
||||
{anchor}
|
||||
{align}
|
||||
fitToScreen={false}
|
||||
resizable={false}
|
||||
>
|
||||
{#if isOpen}
|
||||
<DatePickerPopoverContents
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
export let handlePostionUpdate
|
||||
export let showPopover = true
|
||||
export let clickOutsideOverride = false
|
||||
export let fitToScreen = true
|
||||
export let resizable = true
|
||||
export let wrap = false
|
||||
|
||||
$: target = portalTarget || getContext(Context.PopoverRoot) || ".spectrum"
|
||||
|
@ -93,7 +93,7 @@
|
|||
useAnchorWidth,
|
||||
offset,
|
||||
customUpdate: handlePostionUpdate,
|
||||
fitToScreen,
|
||||
resizable,
|
||||
wrap,
|
||||
}}
|
||||
use:clickOutside={{
|
||||
|
|
|
@ -313,7 +313,7 @@
|
|||
align="right"
|
||||
on:close={close}
|
||||
maxHeight={null}
|
||||
fitToScreen
|
||||
resizable
|
||||
>
|
||||
{#if editIsOpen}
|
||||
<div class="content">
|
||||
|
|
|
@ -44,7 +44,7 @@
|
|||
align={$visibleColumns.length ? "right" : "left"}
|
||||
on:close={close}
|
||||
maxHeight={null}
|
||||
fitToScreen
|
||||
resizable
|
||||
>
|
||||
<div class="content">
|
||||
<slot />
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
export let maxHeight = PopoverMaxHeight
|
||||
export let align = "left"
|
||||
export let open = true
|
||||
export let fitToScreen = false
|
||||
export let resizable = false
|
||||
export let wrap = true
|
||||
|
||||
const { gridID } = getContext("grid")
|
||||
|
@ -40,7 +40,7 @@
|
|||
{open}
|
||||
{anchor}
|
||||
{align}
|
||||
{fitToScreen}
|
||||
{resizable}
|
||||
{wrap}
|
||||
portalTarget="#{gridID} .grid-popover-container"
|
||||
offset={0}
|
||||
|
|
Loading…
Reference in New Issue