-
Notifications
You must be signed in to change notification settings - Fork 769
Closed
Description
I have a problem where I have one column that is a type and another that is a refine on said type:
const posTypes = ["Any", "Noun", "Verb", "Adjective", "Adverb", "Cardinal number"];
const posRefineTypes = {
"Any": [],
"Noun": ["Any", "Single", "Plural", "Proper noun single", "Proper noun plural"],
"Verb": ["Any", "Base form", "Past tense", "gerund or present participle", "past participle", "non-3rd person singular present", "3rd person singular present"],
"Adjective": ["Any", "Comparative", "Superlative"],
"Adverb": ["Any", "Comparative", "Superlative"],
"Cardinal number": []
};
...
<TableHeaderColumn
dataField='Pos' editable={ {type: 'select', options: {values: posTypes}} }
width={"120px"}>
Pos
</TableHeaderColumn>
<TableHeaderColumn
dataField='Refine'
editable={ {type: 'select', options: {values: posRefineTypes[Pos]}} }
width={"120px"}>
Refine
</TableHeaderColumn>
I need the options in the sub type to match the type, but it has to be a constant.
Is there a way to get it done?
Reactions are currently unavailable