Our blazing fast Grid component built with pure JavaScript


Post by suhas.kachare »

Hi Team ,

I am using custom editor for cell editing. And I'm trying to fire an event finishCellEdit, when my editing is finished . In case of of text editor the event is firing properly but when I'm using select editor component , the event is not getting fired.

Below is the code of finishCellEdit event

const config = {
    features: {},
    autoHeight: true,
    columns: {
      data: [...column],
    },
    data: gridData,
    listeners: {
      finishCellEdit: () => {
        console.log("finishCellEdit called");
      },
    },
  }
  

So can you please guide me on this issue.

Attachments
Screen Recording 2022-11-09 at 4.22.30 PM.mov
(3.65 MiB) Downloaded 45 times

Post by alex.l »

It works well in our Basic Grid React demo. Please post your application, we will check what's wrong!

All the best,
Alex


Post by suhas.kachare »

Please find below attached demo application.

Attachments
CellEditFinish.zip
(418.34 KiB) Downloaded 45 times

Post by alex.l »

Ok, I checked your code and see the problem.
You used Ant combo as an editor for second cell, with change callback workaround.
So, when you clicked on dropdown list, focus lost from a cell and cell editing is finished with no changed value. Since no change has been made, finishCellEdit won't be triggered on blur. Workaround for this type of custom editors - manually apply change to the record after cell edit finished (actually canceled by blur).
I am afraid you need to handle this case manually. Maybe trigger your own event on change apply.

All the best,
Alex


Post Reply