ipyaggrid icon indicating copy to clipboard operation
ipyaggrid copied to clipboard

Fixed Grid Height Error

Open icduck opened this issue 2 years ago • 1 comments

conflict data type between Grid() and builder_params.py. Changed it to string

icduck avatar Oct 31 '23 07:10 icduck

Thanks for this contribution!

I think height_in should be an int looking at this: https://github.com/widgetti/ipyaggrid/blob/4c70e294f48076ef35e821a383d07e33ccee178c/ipyaggrid/grid.py#L81 https://github.com/widgetti/ipyaggrid/blob/4c70e294f48076ef35e821a383d07e33ccee178c/ipyaggrid/grid.py#L121 https://github.com/widgetti/ipyaggrid/blob/4c70e294f48076ef35e821a383d07e33ccee178c/ipyaggrid/builder_params.py#L205 https://github.com/widgetti/ipyaggrid/blob/4c70e294f48076ef35e821a383d07e33ccee178c/ipyaggrid/builder_params.py#L207

At that point it is converted to string and put in the height traitlet which is of type string.

It's a bit of a confusing construction: height: int in the Grid contructor is assigned to self.height_in, which is then converted to string and set in the height: Unicode traitlet.

mariobuikhuizen avatar Nov 22 '23 15:11 mariobuikhuizen