kopia lustrzana https://github.com/FacilMap/facilmap
Set max height for popovers
rodzic
fba5049c65
commit
6fda31ad35
|
@ -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>
|
Ładowanie…
Reference in New Issue