dynamic/silverstripe-elemental-baseobject

searchable fields cause issues

Closed this issue · 0 comments

searchable fields should be a simple array, or a 2d array. It currently tries to create filters based on the given value.

private static $searchable_fields = [
        'Title',
        'Name',
        'Content',
    ];

or have title defined like

private static $searchable_fields = [
        'Title' => [
            'title' => 'Title',
        ],
        'Name' => [
            'title' => 'Name',
        ],
        'Content' => [
            'title' => 'Content',
        ],
    ];

https://docs.silverstripe.org/en/4/developer_guides/model/scaffolding/#searchable-fields