Replies: 9 comments 12 replies
-
This is a solved problem in echarts plugin, see this code, I parse content as js, so tailing comma won't be a problem |
Beta Was this translation helpful? Give feedback.
-
and in echarts examples, we used to support comma problem by using list widget's count field, but is deprecate, and example only exist in old commits. Update: the The logic to add tailing comma is <$list filter="[match[no]]">`,`</$list>
I'm not sure what those ` means in the code, it is written by @Gk0Wk . |
Beta Was this translation helpful? Give feedback.
-
I started with JavaScript parsing, but switched to JSON to address concerns about unwanted code execution. I will see about making this change myself when I have some time... |
Beta Was this translation helpful? Give feedback.
-
Adding a "join" attribute to the list widget would be a more complex undertaking than it appears because of the impact on the code that optimises interactive changes to the list widget. |
Beta Was this translation helpful? Give feedback.
-
On face value I wouldn't have thought it more complicated than automating what's in my example snippet? As in, adjusting the generated item template. However, the list widget code is a more complicated than I was expecting... |
Beta Was this translation helpful? Give feedback.
-
I've started working on adding a Once I get that bug fixed, I should be able to submit a PR adding a |
Beta Was this translation helpful? Give feedback.
-
PR #7694, still in draft mode for now until I write some unit tests (running out of time to work on that today), adds a |
Beta Was this translation helpful? Give feedback.
-
I have nothing to add, other than to thank @rmunn for your current and ongoing efforts on this. From the sounds of it, progress is good and I'm hoping the changes (when they're done) will be accepted. |
Beta Was this translation helpful? Give feedback.
-
According to the OP @andrewgoz wants a plain-text output that is joined with a comma. IMO here is one possible solution.
|
Beta Was this translation helpful? Give feedback.
-
I'm currently using the list widget to generate dynamic JSON data. JSON doesn't like dangling commas, which makes working with the list widget tricky. My current code "snippet" looks like:
but what I'd really like is:
Comments?
Beta Was this translation helpful? Give feedback.
All reactions