blob: 09b39f212c90308dd403401e317a1bddfcf6ff40 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
odoo.define('point_of_sale.EditListInput', function(require) {
'use strict';
const PosComponent = require('point_of_sale.PosComponent');
const Registries = require('point_of_sale.Registries');
class EditListInput extends PosComponent {
onKeyup(event) {
if (event.key === "Enter" && event.target.value.trim() !== '') {
this.trigger('create-new-item');
}
}
}
EditListInput.template = 'EditListInput';
Registries.Component.add(EditListInput);
return EditListInput;
});
|