mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Add autocomplete #2457
This commit is contained in:
@@ -176,13 +176,7 @@ class AutoCompleteController extends Controller
|
||||
$filtered = $result->unique('description');
|
||||
$limited = $filtered->slice(0, 15);
|
||||
$array = $limited->toArray();
|
||||
foreach ($array as $index => $item) {
|
||||
// give another key for consistency
|
||||
$array[$index]['name'] = $item['description'];
|
||||
}
|
||||
|
||||
|
||||
return response()->json($array);
|
||||
return response()->json(array_values($array));
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user