tabulator icon indicating copy to clipboard operation
tabulator copied to clipboard

Possibility to store annotation / metadata in cells, cols and rows

Open mormitech opened this issue 9 months ago • 0 comments

Describe the solution you'd like Since there are a couple of bugs that I ran into around "edited" flag lost on certain occasions (https://github.com/olifolkerd/tabulator/issues/4506) and @olifolkerd recommended to store code changed (setValue) cells in separate external arrays, I would propose to have metadata: any field for columnComponents, rowComponents and cellComponents each. This is a common feature I like with certain solutions where developer allows programmers to use the built in objects to store custom info when needed. Gives flexibility and circumvents some messy code.

Since it would be an any type field, devs could use it to store any custom unimplemented flags or values in the component object itself, directly. This would eliminate the issues coming with external array sync and all sorts of other issues.

E.g.: I try to store setValue changed cells in an array but with some row redraw all their elements are lost. This way I could just append a flag to the cell's JSON metadata to store my own flag and remove it when not needed.

Additional context Similar to this question from the past:

https://github.com/olifolkerd/tabulator/issues/2418

mormitech avatar May 27 '24 12:05 mormitech