2018-08-28 10:07:22 +02:00
# 4.3.0
2018-07-16 12:43:27 +02:00
## Overview {#overview}
- `DataList::column()` now returns all values and not just "distinct" values from a column as per the API docs
- `DataList` , `ArrayList` and `UnsavedRalationList` all have `columnUnique()` method for fetching distinct column values
2018-09-25 02:25:23 +02:00
- Take care with `stageChildren()` overrides. `Hierarchy::numChildren() ` results will only make use of `stageChildren()` customisations that are applied to the base class and don't include record-specific behaviour.
2018-10-04 02:35:48 +02:00
- New React-based search UI for the CMS, Asset-Admin, GridFields and ModelAdmins.
2018-10-09 06:31:23 +02:00
- A new `GridFieldLazyLoader` component can be added to `GridField` . This will delay the fetching of data until the user access the container Tab of the GridField.
2018-10-24 04:27:15 +02:00
- `SilverStripe\VersionedAdmin\Controllers\CMSPageHistoryViewerController` is now the default CMS history controller and `SilverStripe\CMS\Controllers\CMSPageHistoryController` has been deprecated.
2018-07-16 12:43:27 +02:00
## Upgrading {#upgrading}
### Fetching distinct column values on DataList
Prior to this release `DataList` would erroneously return a distinct list of values from a column on an object.
If this behaviour is still required, please use `columnUnique()` instead.
2018-10-03 05:50:48 +02:00
### Using legacy GridField search API
2018-10-04 02:35:48 +02:00
GridFields now default to using the new search UI which uses [SilverStripe's FormSchema API ](api:SilverStripe\Forms\Schema\FormSchema ).
2018-10-03 05:50:48 +02:00
If you would rather continue using the old search API, you can remove the default `GridFieldFilterHeader` from your GridField configuration and replace with one whose _legacy_ flag has been enabled.
2018-10-04 02:35:48 +02:00
To enable the legacy search API on a `GridFieldFilterHeader` , you can either:
* set the `useLegacyFilterHeader` property to `true` ,
* or pass `true` to the first argument of its constructor.
2018-10-03 05:50:48 +02:00
2018-10-26 03:28:15 +02:00
To force the legacy search API on all instances of `GridFieldFilterHeader` , you can set it in your [configuration file ](../../configuration ):
```yml
SilverStripe\Forms\GridField\GridFieldFilterHeader:
force_legacy: true
```
2018-10-03 05:50:48 +02:00
```php
public function getCMSFields()
{
$fields = parent::getCMSFields();
// Configure grid field to use legacy search API
$config = new GridFieldConfig_RecordEditor();
2018-10-04 02:35:48 +02:00
$config->getComponentsByType(GridFieldFilterHeader::class)->useLegacyFilterHeader = true;
2018-10-03 05:50:48 +02:00
2018-10-04 02:35:48 +02:00
$grid = GridField::create('Companies', 'Companies', DataList::create(Company::class), $config);
$fields->addFieldToTab('Root.Company', $grid);
2018-10-03 05:50:48 +02:00
return $fields;
}
```
2018-10-24 04:27:15 +02:00
### Keep using the legacy `CMSPageHistoryController`
To keep using the old CMS history controller for every page type, add the following entry to your YML config.
```yml
SilverStripe\Core\Injector\Injector:
SilverStripe\CMS\Controllers\CMSPageHistoryController:
class: SilverStripe\CMS\Controllers\CMSPageHistoryController
```
If you want to use both CMS history controllers in different contexts, you can implement your own _Factory_ class.
```yml
SilverStripe\Core\Injector\Injector:
SilverStripe\CMS\Controllers\CMSPageHistoryController:
factory:
App\MySite\MyCustomControllerFactory
```
[Implementing a _Factory_ with the Injector ](/developer_guides/extending/injector/#factories )