Skip to content

setState not re rendering in version ^1.0.0 #504

@dpram17

Description

@dpram17

Hi @AllenFang

I have a function which simply sets the state of a variable, based on the row index. Version 1.0.0 works perfectly with the code. But when I installed the new version ^1.0.0, it somehow stops rendering. It sets the state of the variable, but doesn't re render. I will provide some code snippets to back this issue.

Note : Basically the column formatter method is not getting called. (No error in console)

Thanks
The div that has a onClick handler:

       <div
        role="button"
        tabIndex="0"
        onKeyDown={() => this.handleSettings(rowIndex)}
        className={gearIconWrapper ${showGearOptions}}
        onClick={() => this.handleSettings(rowIndex)}
      >

The function that's setting the state, but not re rendering :

this.handleSettings = this.handleSettings.bind(this);
handleSettings(rowIndex) { this.setState({ activeIndex: rowIndex, }); }

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions