How to assign a string with angle brackets to a cell in Tabulator.js, for example: "a<b<c"?
P粉718730956
2023-08-03 13:48:37
<p>I have a cell in a Tabulator table that uses a list type editor. The options are populated by an array of strings that look like this (for example): </p>
<pre class="brush:php;toolbar:false;">[
"a<b",
"b<c",
"c<d",
]</pre>
<p>When the list editor is populated (using editorParams:{values:exampleOptions} in the column definition), or when I use setValue() directly on the cell, it discards what follows the angle brackets. So in the dropdown I see something like this: </p>
<pre class="brush:php;toolbar:false;">"a",
"b",
"c",</pre>
<p>How to display complete string in dropdown list/cell? </p>
One way is to use the itemFormatter option in editorParams to define a new element node for the list of values and return the innerHTML of the element containing the list value:
This is an example on the name column: