More customizable trailing row
Currently trailingRowOptions lets you specify the hint text, as well as whether it is sticky or tinted, but it would be great to have some more customizability, such as:
- a custom icon instead of just the "+"
- which column to show the hint on
- hiding the icon on other columns
- force the append action to focus/edit a particular column
I really like the idea of the customizability!
I'm not too familiar in data-grid but I think the trailingRow should be converted to a JSX component/DOM element instead if this level of customizability was wanted to be supported.
There is no need to have it as canvas because it's just one DOM element and DOM/jsx is far more configurable for end developers.
GSheets does this as well for other stuff like the highlighting overlay and such.
Horizontal scrolling would get out of sync if we did that.
Hey @pzcfg, I implemented a few changes to help with trailing row customization: https://github.com/glideapps/glide-data-grid/pull/178 and https://github.com/glideapps/glide-data-grid/pull/179
That should cover this issue, except for
force the append action to focus/edit a particular column
which I'll think about, and perhaps tackle in another issue
This looks great, thank you! Would it also be possible to add a way to hide the animated plus on the other columns? It seems like one option would be to pass in an icon that is blank, but it would be cleaner to have an option to not draw anything in the first place.
This looks great, thank you! Would it also be possible to add a way to hide the animated plus on the other columns? It seems like one option would be to pass in an icon that is blank, but it would be cleaner to have an option to not draw anything in the first place.
Yeah, for now the "solution" is to use a blank icon. I'll think about a way to make a less crapy solution. One very easy change that we could do is add an "empty" icon into our default spritemap, so you don't have to ship your own, at least.