EvHaus / doby-grid

An HTML table element on steroids.
Other
14 stars 5 forks source link

Resizing the grid will always call the columns formatter #173

Open ckosmowski opened 9 years ago

ckosmowski commented 9 years ago

When i am resizing the grid the formatter of all the cells will be called again. For some (or even most) of my cells this wouldn't be necessary at all.

I'm doing live resizing with the grid containing only one column with a custom formatter which is a complex one. It would be nice if there would be an option to tell the grid "don't call this columns formatter again, when resize has been called on the grid".

Do you think this is possible?

EvHaus commented 9 years ago

There may be a more clever way to do this. We can detect which cells need to re-drawn (ie. they come into view, they are resized, etc..) and only re-draw the cells affected.

ckosmowski commented 9 years ago

What i currently dont understand is why it is needed to Fall the formatter again when the cell is resized because wie habe responsive HTML inside the Fell wie dont need to Reformat it. AO it would be nice to just be able to turn this off. Am 18.12.2014 17:25 schrieb "Globex Designs, Inc" <notifications@github.com

:

There may be a more clever way to do this. We can detect which cells need to re-drawn (ie. they come into view, they are resized, etc..) and only re-draw the cells affected.

— Reply to this email directly or view it on GitHub https://github.com/globexdesigns/doby-grid/issues/173#issuecomment-67512025 .

EvHaus commented 9 years ago

DobyGrid doesn't know exactly what you're doing inside your formatter. Maybe you're taking the size of the viewport into your calculation when drawing your cell. In order to accommodate a wide range of use-cases, we force a re-render of the cells during a resize. This is similar to default <table> element behaviour.

ckosmowski commented 9 years ago

Yes i understand that. But i do know what i am doing so it would be nice to just habe the OPTION to disable it. Its always hard if your trying to get your stuff done but you cant get around intelligent things that components are doing. Its just about an added flexibility not about changing the default behaviour. Am 18.12.2014 18:39 schrieb "Globex Designs, Inc" <notifications@github.com

:

DobyGrid doesn't know exactly what you're doing inside your formatter. Maybe you're taking the size of the viewport into your calculation. In order to accommodate a wide range of use-cases, we force a re-render of the cells during a resize. This is similar to default

element behaviour.

— Reply to this email directly or view it on GitHub https://github.com/globexdesigns/doby-grid/issues/173#issuecomment-67524182 .

EvHaus commented 9 years ago

No problem. We can add an option to disable re-rendering during the resize event.