Skip to content

Commit

Permalink
DOC Add SearchableDropdownField to 5.2.0 changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
emteknetnz committed Dec 13, 2023
1 parent 5f985eb commit 9d2dbdd
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions en/04_Changelogs/5.2.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ title: 5.2.0 (unreleased)
- [ErrorPage allowed codes configuration](#errorpage-allowed-codes-configuration)
- [Create random passwords for new users](#create-random-passwords-for-new-users)
- [Buttons to select all files and deselect all files](#bulk-action-buttons)
- [New searchable dropdown fields](#searchable-dropdown-field)
- [More nuanced permissions for `/dev/*` routes](#dev-route-permissions)
- [New exception in React forms](#react-forms-exception)
- [Other new features](#other-new-features)
Expand Down Expand Up @@ -105,6 +106,16 @@ The files section of the CMS now has buttons to select and deselect all files an
![select all functionality in the CMS](../_images/asset-admin-select-all.png)
### New searchable dropdown fields {#searchable-dropdown-field}
A pair of new dropdown form fields have been added which are particularly useful for dropdowns with a large number of options.
[`SearchableDropdownField`](api:SilverStripe\Forms\SearchableDropdownField) is similar to [`DropdownField`](api:SilverStripe\Forms\DropdownField) which allows selecting a single option, and [`SearchableMultiDropdownField`](api:SilverStripe\Forms\SearchableMultiDropdownField) is similar to [`ListboxField`](api:SilverStripe\Forms\ListboxField) which allows selecting multiple options.

Both of these fields include a `setIsLazyLoaded()` method which will load a limited number of options at a time using an AJAX request matching what a user has typed in. There are quite a few options to customise these, including optionally using `SearchContext` to power the lazy-loaded search functionality. We encourage you to look at the API documentation for these new classes to see what you can do with them.

Note that these are both powered by react components, and are only intended to be used within the CMS. If you want to use them on the front-end of your project you will need to provide your own templates and javascript implementation for them.

### More nuanced permissions for `/dev/*` routes {#dev-route-permissions}

Previously, all `/dev/*` routes registered with [`DevelopmentAdmin`](api:SilverStripe\Dev\DevelopmentAdmin) (for example `/dev/tasks/MyBuildTask`) could only be access by administrator users, and this couldn't be configured.
Expand Down

0 comments on commit 9d2dbdd

Please sign in to comment.