svelte-headless-table
svelte-headless-table copied to clipboard
Plugin 'addDataExport' - incorrect export of parent/ child hierarchy
Hi :)
I noticed that the plugin does not seem to output parent/ child hierarchy correctly when choosing type 'object':

Expected behaviour in this case would be the that there are 2 top level objects instead of 6, when expanded. Example RPL
In case the error is on my end.. please give me a hint. Your awesome work is very much appreciated!
Hey @BlueFoxPrime, unfortunately this was a decision that I decided to make for the data export plugin.
My reasoning was that the export plugin is primarily concerned with exporting data as it looks in the table.
However, if there's a need for it, I can look into extending the plugin with an option to preserve nesting?
@BlueFoxPrime Let me know if the nested behavior is what you need, and if the use case is common enough I'll work on adding an option to enable such a feature!
Hey, sorry for the late response but I am on holiday :)
I think that the use case is quite common because I want to share data to other component(s) depending on what’s displayed in the table. The way it’s designed produces strange results, as children are also displayed as parent items. I did some minor modifications to the ‘addDataExport’ plugin to change it. I didn’t manage to test it yet but it seems to work just fine. I can post the code when I get back.
Hey @BlueFoxPrime, that sounds great!
Most of the plugins are missing a lot of test coverage at the moment. If you open a PR, I'll gladly write the testcases for it.
@BlueFoxPrime Let me know if there's any update on this! Otherwise, we'll mark this as resolved for now. Feel free to re-open the issue if necessary.