mirror of
https://github.com/frappe/books.git
synced 2024-11-14 01:14:03 +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];
|
filters.keywords = ['like', query];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let target = this.getTarget();
|
||||||
|
let titleField = frappe.getMeta(target).titleField;
|
||||||
|
|
||||||
const list = await frappe.db.getAll({
|
const list = await frappe.db.getAll({
|
||||||
doctype: this.getTarget(),
|
doctype: target,
|
||||||
filters,
|
filters,
|
||||||
fields: ['name'],
|
fields: ['name', titleField],
|
||||||
limit: 50
|
limit: 50
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -34,7 +37,7 @@ export default {
|
|||||||
|
|
||||||
return list
|
return list
|
||||||
.map(d => ({
|
.map(d => ({
|
||||||
label: d.name,
|
label: d[titleField],
|
||||||
value: d.name
|
value: d.name
|
||||||
}))
|
}))
|
||||||
.concat({
|
.concat({
|
||||||
|
Loading…
Reference in New Issue
Block a user