Direct duplicate a row (without opening the modal)
Direct duplicate a row (without opening the modal)
Hi,
I implemented the duplicate button. This opens a modal when duplicating a row.
How can I directly duplicate a row, without opening a modal?
Is it possible to duplicate multiple rows without a modal? e.g.: I select 3 rows, I press duplicate, and all the 3 rows are duplicated?
Thanks!
This question has an accepted answers - jump to answer
Answers
Yes, the
edit()
method can be told to not display the modal, and then call thesubmit()
method - e.g.:Allan
Thanks for the quick answer!
I still see a little problem: if I select, let's say, 3 rows having different values and press "duplicate", the editor creates 3 news rows but all with the same values.
Is there any possibility to duplicate multiple rows?
If not, how can I disable the "duplicate" button if more than 1 rows are selected?
Thanks!