Select field (dropdown) in editble select mode
See original GitHub issueHi, I have to display Y or N options in dropdown in react bootstrap table cell. code:
const cellEdit={
"mode":"click",
blurToSave: true
}
function dropDownFormatter(cell,row){
return(
<FormControl componentClass="select" defaultValue={cell}>
<option value="Y">Y</option>
<option value="N">N</option>
</FormControl>
)
}
<BootstrapTable data={this.state.serviceInfo.serviceConfigList} selectRow={selectRow} cellEdit={cellEdit}>
<TableHeaderColumn
dataField='archiveEnabled'
dataFormat={ dropDownFormatter}
editable={{type:"select",options:{values:['y','N']}}}
width="120px">Archive Enable</TableHeaderColumn>
</BootstrapTable>
When Iam trying to edit my dropdown Iam getting following error.
TableBody.js:170 Uncaught TypeError: column.format(…).replace is not a function
Note: In tableBody.js we are getting this issue.
Thanks
Issue Analytics
- State:
- Created 6 years ago
- Reactions:2
- Comments:14 (5 by maintainers)
Top Results From Across the Web
Editable 'Select' element - html - Stack Overflow
I would like to have a select element in the form but besides the options in the dropdown, it would be useful to...
Read more >select list dropdown in edit mode - MSDN - Microsoft
User-305496339 posted. Just wondering how to show my edit view with a dropdownlistfor, with the appropriate value for the object selected.
Read more >jQuery Editable Select - GitHub
jQuery Editable Select is a jQuery plugin that transforms a select into an input field where single elements are shown in real-time according...
Read more >Example 11 - how to create editable select box in html
An editable dropdown is also called a " combobox "Here's a solution that simply sets the value of a text input whenever the...
Read more >Editable select - CodePen
HTML ; 1. <script src="https://code.jquery.com/jquery-3.3.1.min.js"></script> ; 2. ; 3. <div class="editable-select-container col-3"> ; 4. <!-- editable-select-id ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@AllenFang I had the similar problem , i used
dropDownFormatter
indataFormat={ dropDownFormatter}
the error i got isUncaught TypeError: column.format(...).replace is not a function
invar format = column.format ? function (value) { return column.format(value, data, column.formatExtraData, r).replace(/<.*?>/g, ''); } : false;
i would suggest to use plain HTML code instead of react-bootstrap tags (FormControl)