gt icon indicating copy to clipboard operation
gt copied to clipboard

Error if `data_color()` could not select any requested row, return data unchanged if a selection resolved as empty

Open olivroy opened this issue 2 months ago • 0 comments

This is a bit tricky API-wise. I like the erroring if you supply a specific row index, row name, or set of them. However, if providing an expression it would be nice to no-op, which is just like the behavior for columns. For rows, I don't know that we currently make the distinction between expression and explicit selection. Also, I don't know if this is the current behavior for other functions with a rows argument (mostly fmt_*() and IIRC some cols_*() fns too).

So, it's worth discussing this a little! I know what I proposed would be a breaking change but I hope it would be a welcome one that fixes some inconsistencies.

Originally posted by @rich-iannone in https://github.com/rstudio/gt/issues/1660#issuecomment-2111145355

olivroy avatar May 15 '24 11:05 olivroy