File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
src/app/Library/CrudPanel Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -280,12 +280,12 @@ public function label($value)
280280 * For example, the dropdown, select2 and select2 filters let the user select
281281 * pre-determined values to filter with. This is how to set those values that will be picked up.
282282 *
283- * @param array $value Key-value array with values for the user to pick from.
283+ * @param array|function $value Key-value array with values for the user to pick from, or a function which also return a Key-value array .
284284 * @return CrudFilter
285285 */
286286 public function values ($ value )
287287 {
288- $ this ->values = $ value ;
288+ $ this ->values = (! is_string ( $ value ) && is_callable ( $ value )) ? $ value () : $ value ;
289289
290290 return $ this ->save ();
291291 }
You can’t perform that action at this time.
0 commit comments