mirror of
https://github.com/versia-pub/frontend.git
synced 2025-12-06 08:28:20 +01:00
fix: 🐛 Fix emoji categories having an incorrect max-height on initial load
This commit is contained in:
parent
7663767141
commit
626828ffa4
|
|
@ -32,9 +32,7 @@ defineProps<{
|
||||||
const collapsed = ref(false);
|
const collapsed = ref(false);
|
||||||
const container = ref<HTMLDivElement | null>(null);
|
const container = ref<HTMLDivElement | null>(null);
|
||||||
|
|
||||||
watch(
|
watch(collapsed, (value) => {
|
||||||
collapsed,
|
|
||||||
(value) => {
|
|
||||||
// Use requestAnimationFrame to prevent layout thrashing
|
// Use requestAnimationFrame to prevent layout thrashing
|
||||||
requestAnimationFrame(() => {
|
requestAnimationFrame(() => {
|
||||||
if (!container.value) {
|
if (!container.value) {
|
||||||
|
|
@ -44,7 +42,5 @@ watch(
|
||||||
? "0px"
|
? "0px"
|
||||||
: `${container.value.scrollHeight}px`;
|
: `${container.value.scrollHeight}px`;
|
||||||
});
|
});
|
||||||
},
|
});
|
||||||
{ immediate: true },
|
|
||||||
);
|
|
||||||
</script>
|
</script>
|
||||||
Loading…
Reference in a new issue