-
Notifications
You must be signed in to change notification settings - Fork 9.2k
Closed
Description
Hello,
I was just curious, whether is it possible to use JSON object (with values assigned to keys) as the base data for the ENUM rendering. I mean, I am sure it is possible, but currently only the values are being rendered in the template:
Enum definitions:
var enum = [
"a",
"b",
"c"
];
var enum2 = {
0: "a",
1: "b",
2: "c"
}
will both produce something like this:
<select>
<option value="a">a</option>
<option value="b">b</option>
<option value="c">c</option>
</select>
I am just curious, is it possible to generate select with values, those are different from displayed text??
var enum = {
1: "a",
3: "b",
5: "c"
};
This enum should produce something like this:
<select>
<option value="1">a</option>
<option value="3">b</option>
<option value="5">c</option>
</select>
Metadata
Metadata
Assignees
Labels
No labels