In ReactGrid how can I programmatically start editing a custom cell template?

18 views Asked by At

Hi all so I have searched for quite some time on how to do this, both on the ReactGrid Github repo as well as here.

So basically I have a custom cell type in a ReactGrid, built using basically exactly the code in their example: https://reactgrid.com/docs/4.0/5-create-your-own-cell-template/

Now assume that I have a menu elsewhere that, when clicked, should cause this cell to become editable; for the moment assume that this is the correct UX, I am not asking for commentary on whether I should be doing that.

How can I programmatically initiate editing on a custom tell template? Or honestly, on ANY cell in ReactGrid? I don't see ANY way to do so, custom cell template or not.

What I have tried:

  • Adding a custom property to the cell template isEditing and managing it via update and getCompatibleCell - it does update in the render function but ReactGrid never thinks the cell is editable, obviously, as its own flag is not set to true.
  • Capturing a ref to the element and using element.dispatchEvent to manually dispatch a dblclick MouseEvent to the element

Long story short nothing has worked. And ReactGrid provides no way to say "I want to put this cell into edit mode". Any ideas?

0

There are 0 answers