File tree Expand file tree Collapse file tree 2 files changed +9
-11
lines changed
Customer/Model/ResourceModel/Grid Expand file tree Collapse file tree 2 files changed +9
-11
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,11 @@ class Collection extends \Magento\Framework\View\Element\UiComponent\DataProvide
19
19
*/
20
20
protected $ document = Document::class;
21
21
22
+ /**
23
+ * @inheritdoc
24
+ */
25
+ protected $ _map = ['fields ' => ['entity_id ' => 'main_table.entity_id ' ]];
26
+
22
27
/**
23
28
* Initialize dependencies.
24
29
*
Original file line number Diff line number Diff line change @@ -225,17 +225,10 @@ private function getFilterIds()
225
225
$ idsArray = $ this ->getDataProvider ()->getAllIds ();
226
226
} else {
227
227
$ searchResult = $ this ->getDataProvider ()->getSearchResult ();
228
- if ($ searchResult instanceof \Magento \Eav \Model \Entity \Collection \AbstractCollection
229
- || $ searchResult instanceof \Magento \Framework \Model \ResourceModel \Db \Collection \AbstractCollection
230
- ) {
231
- // Use collection's getItems for optimization purposes.
232
- $ idsArray = $ searchResult ->getAllIds ();
233
- } else {
234
- // Use compatible search api getItems when searchResult is not a collection.
235
- foreach ($ searchResult ->getItems () as $ item ) {
236
- /** @var $item \Magento\Framework\Api\Search\DocumentInterface */
237
- $ idsArray [] = $ item ->getId ();
238
- }
228
+ // Use compatible search api getItems when searchResult is not a collection.
229
+ foreach ($ searchResult ->getItems () as $ item ) {
230
+ /** @var $item \Magento\Framework\Api\Search\DocumentInterface */
231
+ $ idsArray [] = $ item ->getId ();
239
232
}
240
233
}
241
234
return $ idsArray ;
You can’t perform that action at this time.
0 commit comments