mirror of
https://github.com/frappe/books.git
synced 2024-11-13 00:46:28 +00:00
Add title field to Link.vue
This commit is contained in:
parent
9053f4a710
commit
4f8c546a62
@ -19,10 +19,13 @@ export default {
|
||||
filters.keywords = ['like', query];
|
||||
}
|
||||
|
||||
let target = this.getTarget();
|
||||
let titleField = frappe.getMeta(target).titleField;
|
||||
|
||||
const list = await frappe.db.getAll({
|
||||
doctype: this.getTarget(),
|
||||
doctype: target,
|
||||
filters,
|
||||
fields: ['name'],
|
||||
fields: ['name', titleField],
|
||||
limit: 50
|
||||
});
|
||||
|
||||
@ -34,7 +37,7 @@ export default {
|
||||
|
||||
return list
|
||||
.map(d => ({
|
||||
label: d.name,
|
||||
label: d[titleField],
|
||||
value: d.name
|
||||
}))
|
||||
.concat({
|
||||
|
Loading…
Reference in New Issue
Block a user