Skip to content

Commit 8f40eeb

Browse files
lopezvolivermaartenbreddels
authored andcommitted
feat: expose col_num and row_height options for GridLayout
1 parent fa8639f commit 8f40eeb

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

solara/widgets/vue/gridlayout.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
<div v-if="gridlayout_loaded" style="padding: 0px; width: 100%;">
44
<grid-layout
55
:layout.sync="grid_layout"
6-
:col-num="12"
7-
:row-height="30"
6+
:col-num="col_num"
7+
:row-height="row_height"
88
:is-draggable="draggable"
99
:is-resizable="resizable"
1010
:is-mirrored="false"

solara/widgets/widgets.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ class GridLayout(v.VuetifyTemplate):
5353
resizable = traitlets.CBool(True).tag(sync=True)
5454
cdn = traitlets.Unicode(None, allow_none=True).tag(sync=True)
5555
on_layout_updated = traitlets.traitlets.Callable(None, allow_none=True)
56+
col_num = traitlets.Int(12).tag(sync=True)
57+
row_height = traitlets.Int(30).tag(sync=True)
5658

5759
def vue_layout_updated(self, *args):
5860
if self.on_layout_updated is not None:

0 commit comments

Comments
 (0)