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 a6896d1
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ doesn't necessarily have any visible styling.
- [TreeMultiselectField](api:SilverStripe\Forms\TreeMultiselectField): Represents many-many joins using a tree selector shown in a dropdown-like element.
- [GridField](api:SilverStripe\Forms\GridField\GridField): Displays a [SS_List](api:SilverStripe\ORM\SS_List) in a tabular format. Versatile base class which can be configured to allow editing, sorting, etc.
- [ListboxField](api:SilverStripe\Forms\ListboxField): Multi-line listbox field, through `<select multiple>`.
- [SearchableDropdownField](api:SilverStripe\Forms\SearchableDropdownField): Dropdown field with optional type to search and optional AJAX lazy loading.
- [SearchableMutliDropdownField](api:SilverStripe\Forms\SearchableMutliDropdownField): Multi-select field with optional type to search and optional AJAX lazy loading.

## Utility

Expand Down
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 a6896d1

Please sign in to comment.