I'm having some trouble getting "Select All" working properly for a custom grid.
I have a massDelete action working and deleting multiple items. I have a multiselect column which, after I run a "Select All", displays the fact that the full count is selected (It says that the full count of 150 oo so items are selected). The problem is that when I run the massDelete action after a "Select All", only the 20 or so items on the current page are deleted.
Here is my Mass Action:
<massaction name="listing_massaction">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="selectProvider" xsi:type="string">rule_listing.rule_listing.rule_listing_columns.ids</item>
<item name="indexField" xsi:type="string">rule_id</item>
</item>
</argument>
<action name="delete">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="type" xsi:type="string">delete</item>
<item name="label" xsi:type="string" translate="true">Delete</item>
<item name="url" xsi:type="url" path="*/*/massDelete"/>
<item name="confirm" xsi:type="array">
<item name="title" xsi:type="string" translate="true">Delete items</item>
<item name="message" xsi:type="string" translate="true">Are you sure you wan't to delete selected items?</item>
</item>
</item>
</argument>
</action>
</massaction>
Here is the selectionsColumn
<selectionsColumn name="ids">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="indexField" xsi:type="string">rule_id</item>
</item>
</argument>
</selectionsColumn>
My controller is using the following code:
$this->filter->getCollection($this->collectionFactory->create())
foreach ($collection as $model) {
$model->delete();
}
I have checked the values that are being POSTed to the controller. There is no difference between what is POSTed after doing a "Select All" compared to selecting the first page.
Am I missing something?