setStyleProvider styles get lost after returning from CreateAction

Hi, this is the scenario:

  • I have a table with setStyleProvider initialised in init method, that applies a row style based on an enum property (nothing fancy here)
  • I have a plain old CreateAction attached to the table (standard one, no customisations)

When I first load the screen, my styles are applied correctly…
But if I create a new record, when I return back to the table, all of my styles have disappeared, and only a Refresh restore them. In addition, if I try to force a datasource.Refresh in AfterCommit or AfterWindowClosed, it doesn’t re-apply my styles as well…

This is really weird, because it’s really a simple scenario, and I cannot think that anyone has experienced this before… so what could be wrong?

Thx, Paolo

Hi,

That is definitely strange. I cannot reproduce this. Could you share a sample that illustrates the issue?

Hi, I found the culprit… it is the following rule set that overwrites the background-color property with more specificity:

.halo .v-table-row-odd {
    background-color: #f5f5f5;
    cursor: pointer;
}

when a row with a custom background happens to be “odd”, the color is overwritten by that rule. So I need to add the selector .v-table-row-odd.myclass to my rule set.

I can’t find this mentioned in the docs, maybe it is worth adding a note about it. I don’t know if this can affect your new theme too, but I think so…

Thx anyway for your reply,
P.