User story:
It would be nice to have a setting that allows to represent a custom symbol when the value is absent.
Use case:
User is comparing values by two parameters, and not all parameters may exist for all the values.
In such a case, the cells will be just empty.
If a user want to put, let's say, the em-dash, then he can apply custom cell function to substitute the empty value with em-dash ad hoc, for example:
cell = function(value) {
if (is.na(value) || value == "") {
value <- "—"
} else {
value
}
},
)
but in this case colFormat, like
format = colFormat(separators = TRUE, locales = "en-NZ") stops working for the column, and you have to create more workaround for the values processing inside custom cell function, for our example:
User story: It would be nice to have a setting that allows to represent a custom symbol when the value is absent.
Use case: User is comparing values by two parameters, and not all parameters may exist for all the values. In such a case, the cells will be just empty.
If a user want to put, let's say, the em-dash, then he can apply custom cell function to substitute the empty value with em-dash ad hoc, for example:
but in this case colFormat, like
format = colFormat(separators = TRUE, locales = "en-NZ")
stops working for the column, and you have to create more workaround for the values processing inside custom cell function, for our example:value <- format(value, big.mark = ",", decimal.mark = ".", scientific = FALSE)
or, for example, for percentages:
value <- sprintf("%.1f%%", value * 100)
in which moment the values stop become a number and become the text, which will be sorted in a different way.
illustration picture of the types of the data where it may be useful.![image](https://github.com/glin/reactable/assets/142561934/a801fb4a-562f-468d-9fef-8a8eeac76004)
Not a priority issue, but may ease the life.