I created an admin grid using virtual type in di.xml like this:
<virtualType name="Namespace\Module\Model\ResourceModel\Test\Grid\Collection" type="Magento\Framework\View\Element\UiComponent\DataProvider\SearchResult">
<arguments>
<argument name="mainTable" xsi:type="string">module_test</argument>
<argument name="resourceModel" xsi:type="string">Namespace\Module\Model\ResourceModel\Test\Collection</argument>
</arguments>
</virtualType>
i want to filter the data by the id that passed via an url like this:
http://localhost/admin/namespace_module/test/index/test_id/<id>/key/<form_key>
I want my grid to load only data that contain only test_id which sent via url
<column name="test_id">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="filter" xsi:type="string">text</item>
<item name="label" translate="true" xsi:type="string">test_id</item>
</item>
</argument>
</column>