@@ -132,6 +132,7 @@ public function buildFilterConfig(): void
132132 public function values (): array
133133 {
134134 return [
135+ '0 ' => 'Void ' ,
135136 'physicist ' => 'Physicist ' ,
136137 'physician ' => 'Physician ' ,
137138 ];
@@ -145,6 +146,7 @@ public function getListData(): array|Arrayable
145146 return collect ([
146147 ['id ' => 1 , 'name ' => 'Marie Curie ' , 'job ' => 'physicist ' ],
147148 ['id ' => 2 , 'name ' => 'Louis Pasteur ' , 'job ' => 'physician ' ],
149+ ['id ' => 3 , 'name ' => 'John Void ' , 'job ' => '0 ' ],
148150 ])
149151 ->filter (fn ($ item ) => in_array ($ item ['job ' ], $ this ->queryParams ->filterFor ('job ' )))
150152 ->values ();
@@ -167,6 +169,18 @@ public function getListData(): array|Arrayable
167169 )
168170 ->count ('entityList.data ' , 2 )
169171 );
172+
173+ $ this
174+ ->get ('/sharp/s-list/person?filter_job=0 ' )
175+ ->assertOk ()
176+ ->assertInertia (fn (Assert $ page ) => $ page
177+ ->has ('entityList.data.0 ' , fn (Assert $ json ) => $ json
178+ ->where ('id ' , 3 )
179+ ->where ('name ' , 'John Void ' )
180+ ->etc ()
181+ )
182+ ->count ('entityList.data ' , 1 )
183+ );
170184});
171185
172186it ('saves retained filters in the session when set ' , function () {
0 commit comments