You can also use below code
[
'attribute'=>'attribute name',
'filter'=>array("ID1"=>"Name1","ID2"=>"Name2"),
],
OR
[
'attribute'=>'attribute name',
'filter'=>ArrayHelper::map(Model::find()->asArray()->all(), 'ID', 'Name'),
],
You can also use below code
[
'attribute'=>'attribute name',
'filter'=>array("ID1"=>"Name1","ID2"=>"Name2"),
],
OR
[
'attribute'=>'attribute name',
'filter'=>ArrayHelper::map(Model::find()->asArray()->all(), 'ID', 'Name'),
],