Quantcast
Channel: Active questions tagged row - Stack Overflow
Viewing all articles
Browse latest Browse all 445

PrimeNG Table: Programmatically handle row editing (pSaveEditableRow)

$
0
0

I'm using a PrimeNG Table, and I would like to handle saving row editing programmatically in the case that there are any custom validation errors that need to be addressed beforehand in edit mode. Currently, I have added pSaveEditableRow to a button, which on click, ends row editing and saves edits made to the row. I need to override this and do some validation beforehand. How can this be accomplished?

I've looked into the documentation for PrimeNG, and it looks like I may be able to call the 'saveRowEdit' function, but I need to pass rowData and rowElement, both of which come from pEditableRow, and pEditableRow appears to be set to an object with properties needed for the table.

References:https://github.com/primefaces/primeng/blob/b3e7b3582f98936e0cddcafc921c61a9eabf9bcd/src/app/components/table/table.ts#L1883

https://github.com/primefaces/primeng/blob/b3e7b3582f98936e0cddcafc921c61a9eabf9bcd/src/app/components/table/table.ts#L3807


Viewing all articles
Browse latest Browse all 445

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>