https://kotlinlang.org logo
#kvision
Title
# kvision
l

Lars Erik Rojeras

01/14/2022, 10:29 AM
I have two KVision applications using Tabulator. I have just upgraded both apps to Kvision 5.7.1. The legacy compiler is used. One application works as expected. But, in the other there is a problem with the tabulator rows. When the table is initially displayed the “tabulator-row” is much to high, much higher than the cells in the row. It means that only the first row is visible. If the user scroll the table the row immediately resize correctly and the full table is visible. Any idea what I can to do to fix this?
r

Robert Jaros

01/14/2022, 12:25 PM
Can you provide a working example?
It could be a tabulator 5 bug - you can try using
kvision-tabulator4
module
the "4" module should work exactly like the module from the older KVision version
l

Lars Erik Rojeras

01/14/2022, 1:28 PM
I tried with the "4" module with the same result 😒, I can make the project available on github.
r

Robert Jaros

01/14/2022, 1:30 PM
please do, I'll take a look
l

Lars Erik Rojeras

01/14/2022, 2:05 PM
OK, do the following: 1. git clone https://github.com/rojeras/tpinfo-frontend.git 2. Checkout branch kv-5.7.1 3. Run 4. Go to http://localhost:2000/#/stat/ 5. Check the tabulator table to the right of the pie chart
r

Robert Jaros

01/14/2022, 2:42 PM
Found the issue. To workaround add this rule to your hippo.css
Copy code
.tabulator.table-sm > :not(caption) > * > * {
    padding: 0;
}
And please open an issue on github - this should be fixed somehow for the next release.
l

Lars Erik Rojeras

01/14/2022, 3:00 PM
Thanks a lot for your help! I can confirm the workaround. I'll will open an issue, but can you give a very short summary of the underlying problem.
r

Robert Jaros

01/14/2022, 3:10 PM
To fix https://github.com/rjaros/kvision/issues/305, I've added a similar rule with
padding: inherit
to kvision css. But I wasn't aware there are cases, where tabulator adds it's own paddings to the parent element. My
inherit
rule caused your problem - padding was applied to every row. The workaround just overwrites KVision's rule.
I'll have to change my inherit value to some other fixed value (I'll test if 0 will be ok)
l

Lars Erik Rojeras

01/15/2022, 9:58 AM
I can confirm that your fix solves #332.
👍 1