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.

How to de-select a cell?

See original GitHub issue

The problem I’m having is that if a user clicks to edit a cell but then does something on another view that changes the data and re-renders the BootstrapTable, the cell is still focused and retaining the old value until the user clicks somewhere else on the table. Neither reset nor cleanSelected seem to have any effect. Should these methods be able to do what I’m trying?

I tried the following:

onBootstrapTableRef(instance) {
    this.bootstrapTableRef = instance;
}

componentDidUpdate() {
    this.bootstrapTableRef.reset(); //feel like either of these lines should do the job
    this.bootstrapTableRef.cleanSelected();
}


public render() {
    const cellEdit = {
        mode: "click",
        blurToSave: true
    }

    return (
                <BootstrapTable data={this.props.settings} keyField="settingStage"
                    bordered={false} striped cellEdit={cellEdit} ref={this.onBootstrapTableRef}>
                    ...
                </BootstrapTable>
            </div>
        </div>
    );
}

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
ajitStephencommented, Jun 4, 2018

@saunandrea @AllenFang How to reset edit cell in react-bootstrap-table2 ?

0reactions
RashmiMadlerappa2018commented, Apr 7, 2019

Hi @AllenFang How to clear the selected rows in react-bootstrap-table2 after successful save like cleanSelected in react-bootstrap-table

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Deselect Cells in Excel (An Easy Way)
Hold the Control key · Click on the cell which you want to deselect. In case you want to deselect a range of...
Read more >
How to Deselect Cells in Excel - Excel Champs
Deselect Cells in Excel · First, press and hold the “Control” key from the keyboard. · After that, click on the cells within...
Read more >
How to Deselect Cells in Excel - Spreadsheeto
To deselect the cells, simply click on them again while holding down the 'Ctrl' key. It's important that you don't let go of...
Read more >
How to quickly deselect cells from selected ranges in Excel?
Step 2: Click a cell in the selection that you want to deselect with holding down the Ctrl key. Step 3: Hold down...
Read more >
How to Deselect Cells in Microsoft Excel Without Starting Over
Hold the Ctrl key. · Click to deselect any cell or click and drag to deselect a range of cells within a selection....
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