sensei-grid
sensei-grid copied to clipboard
Suggestion for Select options having a different key and display
I can think of these two:
Option 1
var authors = {"values": [
{"value": "1", "display": "Bob"},
{"value": "2", "display": "John"}
]};
Option 2
var authors = {
"display": ["Bob", "John", "Alice", "Jane"],
"values": ["1", "TWO", "3", "4"]
};
I would like your thoughts before messing around and creating a PR
Normally select input element can have different key from display value, but Sensei Grid doesn't support hidden values for cells, so key and display value should be the same.
I came here specifically looking for this feature as well, as it would enable you to show values for foreign keys (instead of the ID of the foreign record, some other, human-readable value from it). Any chance this could be supported or achieved somehow?
Still need?