You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
From the new version (1.5.2) there is a new issue.
When double-clicking on a cell of type "select" for editing it, then the cell displays a dropdown as it should.
Then when clicking the dropdown for selecting an option, the cell is not in edit mode anymore and the row is not selected anymore.
This makes it impossible to edit a cell of type select.
here is my code: 'use strict'; import React from 'react'; import {BootstrapTable, TableHeaderColumn} from 'react-bootstrap-table'; var products = []; var qualityType = { 0: "good", 1: "bad", 2: "unknown" };
function addProducts(quantity) { var startId = products.length; for (var i = 0; i < quantity; i++) { var id = startId + i; products.push({ id: id, name: "Item name " + id, quality: i%3 }); } }
addProducts(5);
function enumFormatter(cell, row, enumObject){ return enumObject[cell]; }
export default class Example extends React.Component{
From the new version (1.5.2) there is a new issue.
When double-clicking on a cell of type "select" for editing it, then the cell displays a dropdown as it should.
Then when clicking the dropdown for selecting an option, the cell is not in edit mode anymore and the row is not selected anymore.
This makes it impossible to edit a cell of type select.
here is my code:
'use strict';
import React from 'react';
import {BootstrapTable, TableHeaderColumn} from 'react-bootstrap-table';
var products = [];
var qualityType = {
0: "good",
1: "bad",
2: "unknown"
};
function addProducts(quantity) {
var startId = products.length;
for (var i = 0; i < quantity; i++) {
var id = startId + i;
products.push({
id: id,
name: "Item name " + id,
quality: i%3
});
}
}
addProducts(5);
function enumFormatter(cell, row, enumObject){
return enumObject[cell];
}
export default class Example extends React.Component{
render(){
const selectRowProps = {clickToSelect: true, clickToSelectAndEditCell: true, mode: "radio"};
const cellEditProps = { mode: "dbclick"};
return (
<BootstrapTable data={products} cellEdit={cellEditProps} selectRow={selectRowProps}>
<TableHeaderColumn dataField="id" isKey={true}>Product ID</TableHeaderColumn>
<TableHeaderColumn dataField="name">Product Name</TableHeaderColumn>
<TableHeaderColumn dataField="quality" dataFormat={enumFormatter} formatExtraData={qualityType} editable={{type: "select", options: {values: [0,1,2]}}}>Product Quality</TableHeaderColumn>
</BootstrapTable>
);
}
};
Thank you
The text was updated successfully, but these errors were encountered: