Skip to content

Commit

Permalink
DOC Auto scaffolding has_one relations
Browse files Browse the repository at this point in the history
  • Loading branch information
emteknetnz committed Dec 19, 2023
1 parent f2858bd commit 1d51771
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions en/04_Changelogs/5.2.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,12 @@ Both of these fields include a `setIsLazyLoaded()` method which will load a limi

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.

#### Auto scaffolding of `has_one` relations

A `SearchableDropdownField` will now be used when automatically scaffolding `has_one` relations on a form in the CMS. Previously a `DropdownField` was used, and when there were over 100 items a [`NumericField`](api:SilverStripe\Forms\NumericField) was used which was not user friendly.

Previously the [`DBForeignKey.dropdown_field_threshold`](api:SilverStripe\ORM\FieldType\DBForeignKey->dropdown_field_threshold) config property was used as the threshold of the number of options to decide when to switch between auto-scaffolding a `DropdownField` and a `NumericField`. This configuration property is now used as the threshold of the number of options to decide when to start using lazy-loading for the `SearchableDropdownField`.

### 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 1d51771

Please sign in to comment.