Set max height for popovers

pull/256/head
Candid Dauth 2024-03-04 14:11:32 +01:00
rodzic fba5049c65
commit 6fda31ad35
1 zmienionych plików z 17 dodań i 1 usunięć

Wyświetl plik

@ -4,6 +4,7 @@
import Tooltip from "bootstrap/js/dist/tooltip"; import Tooltip from "bootstrap/js/dist/tooltip";
import { useResizeObserver } from "../../utils/vue"; import { useResizeObserver } from "../../utils/vue";
import { useDomEventListener } from "../../utils/utils"; import { useDomEventListener } from "../../utils/utils";
import { maxSizeModifiers } from "../../utils/bootstrap";
/** /**
* Like Bootstrap Popover, but uses an existing popover element rather than creating a new one. This way, the popover * Like Bootstrap Popover, but uses an existing popover element rather than creating a new one. This way, the popover
@ -67,6 +68,10 @@
trigger: 'manual', trigger: 'manual',
popperConfig: (defaultConfig) => ({ popperConfig: (defaultConfig) => ({
...defaultConfig, ...defaultConfig,
modifiers: [
...(defaultConfig.modifiers ?? []),
...maxSizeModifiers
],
strategy: "fixed" strategy: "fixed"
}) })
}); });
@ -141,4 +146,15 @@
<slot></slot> <slot></slot>
</div> </div>
</div> </div>
</template> </template>
<style lang="scss">
.fm-popover {
display: flex;
flex-direction: column;
> .popover-body {
overflow: auto;
}
}
</style>