primefaces / primereact

The Most Complete React UI Component Library
https://primereact.org
MIT License
6.72k stars 1.02k forks source link

DataTable: editor fires the function 6 times with strictmode and 3 times without stricmode #4063

Open MuhammedKilinc60 opened 1 year ago

MuhammedKilinc60 commented 1 year ago

Describe the bug

I am trying to make a editable table and i when i focus, it runs the function 6 times with strictmode and 3 times without stricmode. <Column field="array_options.options_operative_information" header="Operative Information" dataType="text" style={{ minWidth: "10%" }} bodyStyle={{zIndex:0}} filter sortable // bodyClassName={(options) => // actives.includes(options.rowid) && // "p-disabled border-2 border-red-500" // } // editor={(options) => cellEditor(options)} editor={(options) => console.log(options)} onCellEditComplete={(options) => onCellEditComplete(options)} onCellEditCancel={onCellEditCancel} />

Reproducer

https://stackblitz.com/edit/react-bobdbj-ecqtm8?file=src%2Fdemo.js

PrimeReact version

9.0.0-rc.1

React version

18.x

Language

ES6

Build / Runtime

Create React App (CRA)

Browser(s)

chrome

Steps to reproduce the behavior

  1. click in the editable cell

Expected behavior

No response

melloware commented 1 year ago

please edit this StackBlitz I have created for you to show the issue: https://stackblitz.com/edit/react-bobdbj?file=src%2Fdemo.js

it helps developers solve the problem better if they can see the issue.

andreev-artem commented 1 year ago

Reproducer: https://stackblitz.com/edit/react-bobdbj-ecqtm8?file=src%2Fdemo.js

Click on a cell from Name column => check console

melloware commented 1 year ago

Thanks!

github-actions[bot] commented 3 months ago

This issue has been automatically marked as stale. If this issue is still affecting you with the latest version, please leave any comment, and we will keep it open. We are sorry that we have not been able to prioritize it yet. If you have any new additional information, please include it with your comment!