question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Pull select option values from row

See original GitHub issue

Is there a way to populate the options of a select based the values of a row?

<TableHeaderColumn
  dataField={name}
  editable={{
    type: 'select',
    options: { values: this.createOptions() }
  }}>
	{name}
</TableHeaderColumn>

In the example above, this.createOptions() would need to have access to the row, as each row has a different set of options. So something like this.createOptions(row). I could then use that method to output the options stored in that row. I can see how to edit the value of the field using the dataFormat attr, but not how to edit the options associated with the cells in that column.

Appreciate the help.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
jaeho-kimcommented, Feb 26, 2018

I have a question about the select-options. when it has [{‘value’: ‘1’, ‘text’: ‘AAA’}, {‘value’: ‘2’, ‘text’: ‘BBB’}]

I tried to change column using cellEdit() (AAA to BBB) The data has updated correctly but the displayed value was ‘2’ not ‘BBB’. How can I handle this? I want to display by text value.

2reactions
AllenFangcommented, Sep 29, 2017

@5tormTrooper sorry for lately reply, and I think your requirement is very common and necessary, I’ll implement it ASAP, thanks 👍

Read more comments on GitHub >

github_iconTop Results From Across the Web

Select and display value from each new "select option ...
Actually, when an option was selected from the dropdown, you were selecting all the <input> and then changing its value. What I did...
Read more >
Select from Drop-Down and Pull Data from Different ...
... here: https://www.bluepecantraining.com/ select -from- drop -down-and- pull -data-from-different-worksheet-in-excel-vlookup- drop -down/In...
Read more >
Add a list box or combo box - Microsoft Support
If you want Access to store the value you select, click the Control Source property box and select the field to which you...
Read more >
How to get selected value in dropdown list using JavaScript
The value of the selected element can be found by using the value property on the selected element that defines the list. This...
Read more >
Excel drop down list: how to create, edit, copy and remove
Head over to spreadsheet containing the items that appear in your drop-down box, and edit the list in the way you want. Select...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found