Answer the question
In order to leave comments, you need to log in
Why doesn't ArrayDataProvider pass id for edit?
I formatted the data from the database in the ArrayDataProvider, passed it to the widget, but the edit link does not pass the record id to the database, but the record index in the ArrayDataProvider array.
How can I specify that the right id is taken?
Answer the question
In order to leave comments, you need to log in
Everything, it turns out, is in the dock, I didn't read it)
To do this, you need to set 'key' => 'id' in ArrayDataProvider;
1) you can rewrite the button.
2) you can use indexBy('id')
3) I'm not sure, but doesn't the standard data provider eat an array?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question