Skip to content

Commit

Permalink
Merge pull request #108 from communitiesuk/DropdownBug
Browse files Browse the repository at this point in the history
Fix for 2nd dropdown LA select message. msj
  • Loading branch information
Jandums committed Oct 17, 2023
2 parents d288e31 + 4c5276b commit e4f14e2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "uk_gov_dash_components",
"version": "1.22.5",
"version": "1.22.6",
"description": "Dash components for Gov UK",
"repository": {
"type": "git",
Expand Down
6 changes: 4 additions & 2 deletions src/lib/fragments/AutoComplete.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,10 @@ const AutoComplete = (props) => {
}

const isQueryAnOption = (query, options) => {
return options.map(entry => templateInputValue(entry).toLowerCase()).indexOf(query.toLowerCase()) !== -1
}
return options.some(entry => {
return (entry.value === query);
});
};

const handleComponentBlur = (newState, escape) => {
const focusOnBlur = escape && (selectElement) ? -1 : null
Expand Down

0 comments on commit e4f14e2

Please sign in to comment.