From d92bac4f3e2f32fe7a3a6aac232944b2d97f06a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ulysse=20G=C3=A9rard?= Date: Wed, 28 Aug 2024 21:30:23 +0200 Subject: [PATCH] Fix table height --- .../examples/virtual-table/brr_lwd_ui.css | 4 ++++ vendor/brr_lwd_ui/examples/virtual-table/index.html | 13 ++++++++++++- vendor/brr_lwd_ui/examples/virtual-table/main.ml | 7 +++++-- 3 files changed, 21 insertions(+), 3 deletions(-) diff --git a/vendor/brr_lwd_ui/examples/virtual-table/brr_lwd_ui.css b/vendor/brr_lwd_ui/examples/virtual-table/brr_lwd_ui.css index 70260ac..9b38731 100644 --- a/vendor/brr_lwd_ui/examples/virtual-table/brr_lwd_ui.css +++ b/vendor/brr_lwd_ui/examples/virtual-table/brr_lwd_ui.css @@ -76,6 +76,10 @@ html { border-left: 1px solid black; border-bottom: 1px solid black; + :has(> &) { + overflow: hidden; + } + & .lwdui-lazy-table-content, & .lwdui-lazy-table-content-wrapper, & .lwdui-virtual-table-row { diff --git a/vendor/brr_lwd_ui/examples/virtual-table/index.html b/vendor/brr_lwd_ui/examples/virtual-table/index.html index fadc6bf..cefb3ed 100644 --- a/vendor/brr_lwd_ui/examples/virtual-table/index.html +++ b/vendor/brr_lwd_ui/examples/virtual-table/index.html @@ -5,10 +5,21 @@ OCAMIX + - \ No newline at end of file + diff --git a/vendor/brr_lwd_ui/examples/virtual-table/main.ml b/vendor/brr_lwd_ui/examples/virtual-table/main.ml index ea186c4..625c512 100644 --- a/vendor/brr_lwd_ui/examples/virtual-table/main.ml +++ b/vendor/brr_lwd_ui/examples/virtual-table/main.ml @@ -28,8 +28,11 @@ let app = let table = { table; row_height = Em 5. } in let table = Virtual.make ~ui_table:table data in Elwd.div - ~at:Attrs.O.(v (`P (A (At.style (Jstr.v "height:50vh"))))) - [ `R table ] + ~at:Attrs.O.(v (`P (C "flex"))) + [ + `P (El.div [ El.txt' "options" ]); + `R (Elwd.div ~at:Attrs.O.(v (`P (C "table"))) [ `R table ]); + ] let _ = let on_load _ =