sensei-grid icon indicating copy to clipboard operation
sensei-grid copied to clipboard

Suggestion for Select options having a different key and display

Open avinashjoshi opened this issue 9 years ago • 3 comments

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

avinashjoshi avatar Jul 29 '15 16:07 avinashjoshi

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.

lauris avatar Feb 06 '16 13:02 lauris

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?

timwis avatar Mar 03 '16 21:03 timwis

Still need?

kharitonovpavel avatar Nov 01 '16 21:11 kharitonovpavel