mirror of
https://github.com/PanJiaChen/vue-element-admin.git
synced 2025-08-07 18:25:45 +08:00
infinite loop in product table (#1043)
* infinite loop in product table * Show suggestions when input gets focus Co-authored-by: elsiosanchez <elsiossanches@gmail.com>
This commit is contained in:
parent
5fa463d741
commit
2ce8853978
@ -47,8 +47,10 @@
|
||||
clearable
|
||||
style="width: 100%;"
|
||||
popper-class="custom-field-prodcut-info"
|
||||
:trigger-on-focus="true"
|
||||
:fetch-suggestions="localSearch"
|
||||
:select-when-unmatched="true"
|
||||
:highlight-first-item="true"
|
||||
@shortkey.native="shortcutKeyMethod"
|
||||
@select="handleSelect"
|
||||
>
|
||||
@ -162,12 +164,6 @@ export default {
|
||||
}
|
||||
},
|
||||
localSearch(stringToMatch, callBack) {
|
||||
if (this.isEmptyValue(stringToMatch)) {
|
||||
// not show list
|
||||
callBack([])
|
||||
return
|
||||
}
|
||||
|
||||
let results = this.listWithPrice
|
||||
if (!this.isEmptyValue(stringToMatch)) {
|
||||
const parsedValue = stringToMatch.toLowerCase().trim()
|
||||
|
@ -37,8 +37,9 @@
|
||||
<el-table
|
||||
ref="listProducto"
|
||||
v-shortkey="shortsKey"
|
||||
v-loading="isEmptyValue(listWithPrice) || isLoadedServer"
|
||||
v-loading="isLoadedServer"
|
||||
:data="localTableSearch(listWithPrice)"
|
||||
:empty-text="$t('form.pos.tableProduct.empty')"
|
||||
border
|
||||
fit
|
||||
height="450"
|
||||
|
@ -447,7 +447,8 @@ export default {
|
||||
options: 'Options',
|
||||
editQuantities: 'Edit Quantities',
|
||||
pin: 'Insert Pin',
|
||||
remove: 'Remove'
|
||||
remove: 'Remove',
|
||||
empty: 'Enter the product name, code or UPC'
|
||||
},
|
||||
order: {
|
||||
order: 'Order',
|
||||
|
@ -423,7 +423,8 @@ export default {
|
||||
options: 'Opciones',
|
||||
editQuantities: 'Editar Cantidades',
|
||||
pin: 'Ingrese Pin',
|
||||
remove: 'Eliminar'
|
||||
remove: 'Eliminar',
|
||||
empty: 'Ingrese el nombre del producto, código o UPC'
|
||||
},
|
||||
order: {
|
||||
order: 'Orden',
|
||||
|
Loading…
x
Reference in New Issue
Block a user