h2oai / nitro

Create apps 10x quicker, without Javascript/HTML/CSS.
https://nitro.h2o.ai
Apache License 2.0
200 stars 14 forks source link

Column resizing should not be disabled if min-width is set #98

Closed lo5 closed 1 year ago

lo5 commented 1 year ago

image (14)

lo5 commented 1 year ago

I could not reproduce this. Might have something to do with the header label length.

view(box(
    headers=[
        header('Flavor', mode='md multiline', style='min-w-[200px]'),
        header('Super cheap!', style='min-w-[100px]'),
        header('Extras', style='min-w-[130px]'),
        header('Comments', style='min-w-[170px]'),
    ],
    options=[
        option('cinnamon', options=['Cinnamon Sugar', '$1.99', 'Sugar and spice', 'Free coffee']),
        option('sugar', options=['Powdered Sugar', '$1.99', 'Served warm', 'Free coffee']),
        option('vanilla', options=['Vanilla', '$2.99', 'With cookie crumbles', 'Free coffee']),
        option('chocolate', options=['Chocolate', '$2.99', 'With sprinkles', 'Free coffee']),
        option('blueberry', options=['Blueberry', '$2.99', 'With real blueberry', 'Free coffee']),
    ],
))

column-resizing

lo5 commented 1 year ago

Same code as above, but with longer labels:

column-resizing-2

The problem will go away if the column labels are shorter and don't conflict with the column's width constraints.