Skip to content

Commit

Permalink
Document in CHANGELOG
Browse files Browse the repository at this point in the history
  • Loading branch information
36degrees committed May 13, 2022
1 parent f2628bc commit 6d2b1d2
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,48 @@

### New features

#### Check checkboxes by using the `checkedValues` option

When using the Checkboxes nunjucks macro you can now use `checkedValues` option to indicate which checkboxes should be checked when the page loads.

For example, this would check the checkboxes that have the values 'foo' and 'bar':

```
checkedValues: ['foo', 'bar']
```

This is an alternative to setting the `checked` option on each individual checkbox item.

This change was introduced in [pull request #2616: Allow selecting options by passing current values](https://github.com/alphagov/govuk-frontend/pull/2616).

#### Check a radio button by using the `checkedValue` option

When using the Radios nunjucks macro you can now use `checkedValue` option to indicate which radio should be checked when the page loads.

For example, this would check the radio that has the values 'foo':

```
checkedValue: 'foo'
```

This is an alternative to setting the `checked` option on each individual radio item.

This change was introduced in [pull request #2616: Allow selecting options by passing current values](https://github.com/alphagov/govuk-frontend/pull/2616).

#### Select an option in a Select by using the `selectedValue` option

When using the Select nunjucks macro you can now use `selectedValue` option to indicate which option should be selected when the page loads.

For example, this would select the option that has the value 'foo':

```
selectedValue: 'foo'
```

This is an alternative to setting the `select` option on each individual option item.

This change was introduced in [pull request #2616: Allow selecting options by passing current values](https://github.com/alphagov/govuk-frontend/pull/2616).

#### Import GOV.UK Frontend JavaScript as ES modules

You can now import our component JavaScript into your service as ES modules, if you're using a bundler.
Expand Down

0 comments on commit 6d2b1d2

Please sign in to comment.