GwtMaterialDesign / gwt-material-table

A complex table component designed for the material design specifications
https://gwtmaterialdesign.github.io/gmd-table-demo/
Apache License 2.0
27 stars 31 forks source link

MaterialDataTable in a row expanded from another MaterialDataTable don't show data #130

Closed ghost closed 6 years ago

ghost commented 6 years ago

Hi, I'm creating DataTables inside another DataTable and data loads correctly, but the child DataTable dont show data in their rows. However, the header and column names shows data. I debugged and the data is ok and loaded, but the rows continue in blank.

image (Child DataTable with rows in blank)

image (Debugging the data is ok)

The data in father DataTable are showing ok (photo 1, first row with data) and I'm creating the child in the same way that I created the father.

Thanks

simerlec commented 6 years ago

Hey,

I had the same issue using a table inside a table row expansion. IIRC it had to do with max height. Check for a css rule that sets the max-height to 0.

kr

almerlo commented 6 years ago

hi simerlec, thanks for you response. im having the same issue and i checked that. i have max-height in 55px. If i set to 0 or a very large number, nothing happen. Are you sure if the problem has something to do with that css property? I was editing the html with chrome developer tool and if i delete the div wich contains the value (ADD000001 in this case), the value is shown ok. I have to delete the div, it is not enough if i delete the css class "cell" only.

Any other idea?

The problem is just with datatable inside a table row expansion. i tried with other controls and it seems to work fine. step1 step2 sin titulo

simerlec commented 6 years ago

Hey @almerlo @diegoe8

pretty sure that this was the issue here. The div inside the td was getting a max-height: 0; which you can see here...

screenshot 2018-01-05 22 27 01

After overriding the style...

screenshot 2018-01-05 22 29 00

the text finally showed up :)

Hope this helps.

almerlo commented 6 years ago

Mmm. I will keep trying. By the way, what version of GMD are you using?

Thanks

simerlec commented 6 years ago

2.0

almerlo commented 6 years ago

It works!!!! Thanks simerlec. You saved the week.