Skip to content

Commit

Permalink
fix search button
Browse files Browse the repository at this point in the history
  • Loading branch information
saleem-hadad committed May 15, 2019
1 parent a63c899 commit 8c3ced6
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion publishable/assets/js/app.js

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion resources/js/components/AlgoliaSearchBox.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ export default {
props: ["algoliaKey", "algoliaIndex", "version"],
methods: {
close() {
this.$emit("close");
if(! ['search-button', 'search-button-icon'].includes(targetId)) {
this.$emit("close");
}
}
},
mounted() {
Expand Down
7 changes: 5 additions & 2 deletions resources/js/components/InternalSearchBox.vue
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,11 @@ export default {
};
},
methods: {
close() {
this.$emit("close");
close(e) {
let targetId = e.target.id;
if(! ['search-button', 'search-button-icon'].includes(targetId)) {
this.$emit("close");
}
},
navigateToHeading(page, heading) {
window.location = this.versionUrl + page.path + "#" + this.slugify(heading);
Expand Down
2 changes: 1 addition & 1 deletion resources/views/partials/nav.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
:type="searchBox ? 'primary' : 'link'"
@click="searchBox = ! searchBox"
class="px-4">
<i class="fas fa-search"></i>
<i class="fas fa-search" id="search-button-icon"></i>
</larecipe-button>
@endif

Expand Down

0 comments on commit 8c3ced6

Please sign in to comment.