Skip to content
This repository has been archived by the owner on Feb 2, 2023. It is now read-only.

Commit

Permalink
fix(set-val-icon): show correct icon when calling setVal (#760)
Browse files Browse the repository at this point in the history
  • Loading branch information
JonathanMontane authored Apr 1, 2019
1 parent c852dd2 commit 3050e15
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion autocompleteDataset.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
require('./src/navigatorLanguage');
const createAutocompleteDataset = require('./src/createAutocompleteDataset')
.default;
const css = require('./src/places.css');
const css = require('./src/places.css').default;
const insertCss = require('insert-css');
insertCss(css, { prepend: true });

Expand Down
7 changes: 7 additions & 0 deletions src/places.js
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,13 @@ export default function places(options) {

placesInstance.setVal = (...args) => {
previousQuery = args[0];
if (previousQuery === '') {
pin.style.display = '';
clear.style.display = 'none';
} else {
clear.style.display = '';
pin.style.display = 'none';
}
autocompleteInstance.autocomplete.setVal(...args);
};

Expand Down

0 comments on commit 3050e15

Please sign in to comment.