Closed bazuka5801 closed 10 months ago
Describe the bug A clear and concise description of what the bug is.
To Reproduce Steps to reproduce the behavior:
Expected behavior calcFitHeight calculate height automatically when selector is rendered or changed size
Screenshots If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Smartphone (please complete the following information):
Additional context workaround
const pane = ref<CupertinoPane | null>(null) function epochTime() { return Math.floor(Date.now() / 1000) } const loadTime = epochTime() async function fitHeihtFix() { if (epochTime() - 5 > loadTime) return while ( pane.value.getPaneHeight() < 100 || Number.isNaN(pane.value.getPaneHeight()) ) { await new Promise((resolve) => { setTimeout(resolve, 10) }) pane.value.calcFitHeight() } } function showDialog() { pane.value.present(...) fitHeihtFix() }
My mistake, I'm using defineAsyncComponent with ES import('my component.vue'), which causes a problem with calcFitHeight since the selector is not rendered yet.
import('my component.vue')
calcFitHeight
Describe the bug A clear and concise description of what the bug is.
To Reproduce Steps to reproduce the behavior:
Expected behavior calcFitHeight calculate height automatically when selector is rendered or changed size
Screenshots If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Smartphone (please complete the following information):
Additional context workaround