-
Notifications
You must be signed in to change notification settings - Fork 73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add clear search button. #152
base: develop
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -5,6 +5,7 @@ | |||||
<span class="search-icon flaticon-musica-searcher" v-if="mode == 'product'"></span> | ||||||
<span class="search-icon flaticon-supermarket-scanner" v-if="mode == 'scan'"></span> | ||||||
<div class="search-type" v-hotkey="hotkeys"> | ||||||
<button type="button" class="clear-button" v-if="serachInput != ''" @click="clearSearch">X</button> | ||||||
<a href="#" :class="{ active: mode == 'product'}" @click.prevent="changeMode('product')">{{ __( 'Product', 'wepos' ) }}</a> | ||||||
<a href="#" :class="{ active: mode == 'scan'}" @click.prevent="changeMode('scan')">{{ __( 'Scan', 'wepos' ) }}</a> | ||||||
</div> | ||||||
|
@@ -155,6 +156,11 @@ export default { | |||||
this.$refs.productSearch.blur(); | ||||||
}, | ||||||
|
||||||
clearSearch() { | ||||||
this.searchClose(); | ||||||
this.serachInput = ''; | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Correct the typo in the variable name. - this.serachInput = '';
+ this.searchInput = ''; Committable suggestion
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Dear reviewer, this is not a typo but the original variable name. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @daviddaytw, thank you for the clarification. I have verified that 'serachInput' is consistently used throughout the Analysis chain |
||||||
}, | ||||||
|
||||||
onKeyDown() { | ||||||
jQuery('.product-search-item.selected').next().children('a').focus(); | ||||||
}, | ||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct the typo in the variable name.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dear reviewer, this is not a typo but the original variable name.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@daviddaytw, thank you for clarifying the usage of the variable name 'serachInput'. I appreciate your prompt response and will respect the existing naming convention in your codebase. If there's anything else you need, feel free to let me know!