Datatable textarea editing new line

UI Components for React
Post Reply
gontanaka
Posts: 2
Joined: 04 Apr 2023, 16:44

05 Apr 2023, 13:59

Hello,

Im using `primereact/datatable` with a textarea when editing cells. The problem is that when I hit `enter` instead of a new line it closes the edition.

Is there any way around this?

Thank you very much

gontanaka
Posts: 2
Joined: 04 Apr 2023, 16:44

11 Apr 2023, 21:31

Anyone had this issue before?

Melloware
Posts: 3717
Joined: 22 Apr 2013, 15:48

12 Apr 2023, 21:37

Most likely the CellEditor is capturing the bubbled up ENTER key and closing the editor.

You probably need to add an `onKeyUp` to your TextArea and add "if (key ==13) { event.stopPropagatation();}" to stop the event from bubbling up to the Cell Editor.
PrimeFaces Developer | PrimeFaces Extensions Developer
GitHub Profile: https://github.com/melloware
PrimeFaces Elite 13.0.0 / PF Extensions 13.0.0
PrimeReact 9.6.1

Post Reply

Return to “PrimeReact”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 1 guest