Datatable editingRows

UI Components for Vue
Post Reply
patrick_a1987
Posts: 2
Joined: 29 Oct 2020, 12:23

29 Oct 2020, 12:31

Hello, I have been trying to initialise the editingRows in multiple different ways to try and load my datatable with rows already in editor mode, or to set editor mode programatically on a selected row, however I can't seem to get it to work. In the documentation on row editing it clearly states
Row Editing is defined by setting cellEdit as "row", defining editingRows with the v-model directive to hold the reference to the editing rows and adding a row editor column to provide the editing controls. Note that since editingRows is two-way binding enabled, you may use it to initially display one or more rows in editing more or programmatically toggle row editing.
however there is no how-to. Could someone show me a working example of this please? :?

patrick_a1987
Posts: 2
Joined: 29 Oct 2020, 12:23

06 Nov 2020, 22:22

For anyone struggling with the same issue, turns out that the solution was quite simple and required direct re-assignment to this.editingRows - I previously tried adding a new value to it by using push.

Here's how I did it (while keeping rows - which were in edit mode - in editing mode):

Code: Select all

this.editingRows = [...this.editingRows, this.newRow]

mert.sincan
Posts: 4484
Joined: 29 Jun 2013, 12:38

12 Nov 2020, 10:26

+1, thanks a lot for the update!

Best Regards,

Post Reply

Return to “PrimeVue”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 1 guest