Saulis / iron-data-table

iron-data-table is a Web Component for displaying data as a table or grid. Built on top of iron-list using Polymer.
Apache License 2.0
147 stars 66 forks source link

Hidden property is not being passed correctly from data-table-column to data-table-cell #157

Open BartoszGalek opened 7 years ago

BartoszGalek commented 7 years ago

when the amount of data is big and we use IRON-MEDIA-QUERY to hide the columns some of the cells are not shown correctly In my example I’m using table 7 columns and pagesize 7 rows

Initially everything is correct image

the page size is 7 image

there are 7 columns (of which two are hidden) image

there are 140 cells image

polymer component uses the iron-media-query to hide the columns image

property is declared as an object image

data binding to hidden property image

initially there are 40 hidden cells (two columns initially hidden) image

after the table along with the window is being resised few times and new data is being loaded: the amount of hidden cells is incorrect image

it is visible to the user on the screen image

Initial investigation was that the data-table-cell _hiddenChanged event is not being called image

It can be reproduced also by changing the hidden property of the data-table-colummn manually

Hint: The property seems not to be passed to elements with negative coordinates.

Saulis commented 7 years ago

Hi!

I think the problem here might actually be the parent property columnHideMatch you're using, it's not handled correctly in the cells. It's a more general issue I need to look into more.

Meanwhile, I think you can workaround the issue by using primitive properties for each media query, e.g. <iron-media-query query="..." query-matches="{{assigneeMatches}}">

BartoszGalek commented 7 years ago

Hi @Saulis !

First of all thanks a lot for your reply.

I have applied the workaround with primitive properties but unfortunately it had not helped

have a look here:

polymer component uses the iron-media-query to hide the columns image

primitive properties are declared as objects image

unfortunately still persist :/ after the table along with the window is being resised few times and new data is being loaded: the amount of hidden cells is incorrect (odd number) image

it is visible to the user on the screen image

Cheers

Saulis commented 7 years ago

hmm.. strange. Can you make the problem reproduce itself by modifying this snippet: http://jsbin.com/pubole/1/edit?html,output ?