Skip to content

Commit

Permalink
Pass value to govukSelect in autocomplete component
Browse files Browse the repository at this point in the history
  • Loading branch information
paulrobertlloyd committed Sep 26, 2023
1 parent 0662b87 commit 2cf4200
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions x-govuk/components/autocomplete/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ If you’re using Nunjucks macros in production with `html` options, or ones end
| **id** | string | **Required.** ID for each autocomplete. |
| **name** | string | **Required.** Name property for the autocomplete. |
| **items** | array | **Required.** Array of option items for the autocomplete. See [items](#options-for-items). |
| **value** | string | Value for the option which should be selected. Use this as an alternative to setting the `selected` option on each individual item. |
| **allowEmpty** | boolean | Whether to allow no answer to be given. Default is `false`. |
| **autoselect** | boolean | Whether to highlight the first option when the user types in something and receives results. Pressing enter will select it. Default is `false`. |
| **displayMenu** | string | Specify the way the menu should appear, whether `inline` or as an `overlay`. Default is `inline`. |
Expand Down
1 change: 1 addition & 0 deletions x-govuk/components/autocomplete/template.njk
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
{{ govukSelect({
id: params.id,
name: params.name,
value: params.value,
items: items,
describedBy: params.describedBy,
label: params.label,
Expand Down

0 comments on commit 2cf4200

Please sign in to comment.