add maxHeight default
Some checks failed
ci/woodpecker/push/test Pipeline was successful
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/push/lint-backend Pipeline was successful
ci/woodpecker/push/lint-foundkey-js Pipeline was successful
ci/woodpecker/push/lint-client Pipeline was successful
ci/woodpecker/pr/lint-foundkey-js Pipeline was successful
ci/woodpecker/pr/lint-backend Pipeline was successful
ci/woodpecker/pr/build Pipeline was successful
ci/woodpecker/pr/lint-client Pipeline failed
ci/woodpecker/pr/test Pipeline failed

This commit is contained in:
Johann150 2022-09-21 11:57:24 +02:00 committed by Francis Dinh
parent 67852b741d
commit e6fb4aa505

View file

@ -38,7 +38,7 @@ const props = withDefaults(defineProps<{
foldable?: boolean;
expanded?: boolean;
scrollable?: boolean;
maxHeight?: number;
maxHeight?: number | null;
}>(), {
showHeader: true,
thin: false,
@ -46,6 +46,7 @@ const props = withDefaults(defineProps<{
foldable: false,
expanded: true,
scrollable: false,
maxHeight: null,
});
let showBody: boolean = $ref(props.expanded);
@ -69,7 +70,7 @@ onMounted(() => {
}, {
immediate: true,
});
if (containerEl && typeof props.maxHeight !== 'undefined') {
if (containerEl && props.maxHeight != null) {
containerEl.style.setProperty('--maxHeight', props.maxHeight + 'px');
}