-
Notifications
You must be signed in to change notification settings - Fork 430
Description
Bug description:
When using colunmns.editor as CHECKBOX type, Checked checkbox is shown as Unchecked when clicking on it to update its value.
Steps:
- Create BootstrapTable with cell Edit props for columns.editor type CHECKBOX.
- Make checkboxes true by default (for testing)
- now click on checkbox cell to edit its value
- Notice - When you click the CHECKED checkbox cell to edit it, it shows Unchecked already while in edit mode. Below images will show it more clearly.
Screenshots:
for example : my grid has 4 checkboxes, 2 of which are currently True.
Now I am clicking on first cell to UnCheck the checkbox.
Notice 2 things in above image -
-
I just clicked the first cell and it shows unchecked checkbox without changing its value. its original value is checked.
shouldn't it show Checked box? -
Why checkbox comes on left side when in edit mode?
my checkbox column is like this:
{
dataField: 'isActive',
sort: true,
text: 'Status',
editor: {
type: Type.CHECKBOX,
value: 'Y:N'
},
formatter: (cell, row, rowIndex) => {
// console.log(cell, row)
return (
<Input type="checkbox" style={{ marginLeft: 90 }} checked={cell} ></Input>
);
},
},
codesandbox sample -
https://bdnuf.sse.codesandbox.io/
In above example - all 4 checkboxes are set to true initially.
Try to click any of the cell for checkbox and notice that it shows as false value.
Expected - It should show as its original value which is true in this case.
Please help