refactor: simplify solid reactivity across app and web (#20497)

This commit is contained in:
Shoubhit Dash
2026-04-02 17:14:05 +08:00
committed by GitHub
parent db93891373
commit d540d363a7
8 changed files with 70 additions and 67 deletions
+7 -4
View File
@@ -83,12 +83,15 @@ export function createOverflow() {
return overflow()
},
ref(el: HTMLElement) {
const sync = () => {
setOverflow(el.scrollHeight > el.clientHeight + 1)
}
const ro = new ResizeObserver(() => {
if (el.scrollHeight > el.clientHeight + 1) {
setOverflow(true)
}
return
sync()
})
sync()
ro.observe(el)
onCleanup(() => {