You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With the Kotti table we want to have the possibility of highlighting certain rows. See the design here
The basic idea is to have highlighted cells. This can be achieved easily by using a class. But since the highlighted cell or rather its column could be hidden or out of screen, we need a failsafe way to communicate to the user that a table row contains one of those highlighted cells.
This is not possible right now. You can only apply custom styles to all rows at once using the tables trClasses prop.
To change this, highlighting could become a feature supported by kotti itself, which would then take care of also highlighting the row. For this my proposal would be a prop on a KtTableColumn like highlightFunction that has a similar signature to the validator function in KtField*:
With that in place, we could see both for individual cells if they should be highlighted and (with changes to the column store I assume) for a row if a highlighted cell is contained and should therefore be highlighted.
Alternatively, it should be possible to apply classes to table individually, based on the row's content. In that scenario I would propose two expand trClasses to also accept a Function with this signature:
declarefunctiontrClasses(row: t)=>string
In that scenario, the exact logic of highlighting needs to be handled by the client side code.
The text was updated successfully, but these errors were encountered:
With the Kotti table we want to have the possibility of highlighting certain rows. See the design here
The basic idea is to have highlighted cells. This can be achieved easily by using a class. But since the highlighted cell or rather its column could be hidden or out of screen, we need a failsafe way to communicate to the user that a table row contains one of those highlighted cells.
This is not possible right now. You can only apply custom styles to all rows at once using the tables
trClasses
prop.To change this, highlighting could become a feature supported by kotti itself, which would then take care of also highlighting the row. For this my proposal would be a prop on a
KtTableColumn
likehighlightFunction
that has a similar signature to thevalidator
function inKtField*
:With that in place, we could see both for individual cells if they should be highlighted and (with changes to the column store I assume) for a row if a highlighted cell is contained and should therefore be highlighted.
Alternatively, it should be possible to apply classes to table individually, based on the row's content. In that scenario I would propose two expand
trClasses
to also accept a Function with this signature:In that scenario, the exact logic of highlighting needs to be handled by the client side code.
The text was updated successfully, but these errors were encountered: