2
0
mirror of https://github.com/frappe/books.git synced 2025-01-06 08:40:43 +00:00

tabs to spaces

This commit is contained in:
Rushabh Mehta 2018-01-23 18:01:09 +05:30
parent 8df658112f
commit c77f319d81

View File

@ -5,21 +5,21 @@ const Awesomplete = require('awesomplete');
class LinkControl extends BaseControl { class LinkControl extends BaseControl {
make() { make() {
super.make(); super.make();
this.input.setAttribute('type', 'text'); this.input.setAttribute('type', 'text');
this.awesomplete = new Awesomplete(this.input, { this.awesomplete = new Awesomplete(this.input, {
autoFirst: true, autoFirst: true,
minChars: 0, minChars: 0,
maxItems: 99 maxItems: 99
}); });
// rebuild the list on input // rebuild the list on input
this.input.addEventListener('input', async (event) => { this.input.addEventListener('input', async (event) => {
this.awesomplete.list = (await frappe.db.get_all({ this.awesomplete.list = (await frappe.db.get_all({
doctype: this.options, doctype: this.options,
filters: {keywords: ["like", this.input.value]}, filters: { keywords: ["like", this.input.value] },
limit: 50 limit: 50
})).map(d => d.name); })).map(d => d.name);
}); });
} }
}; };