feat: allow image in data pill
This commit is contained in:
parent
be9f43ed81
commit
40699e4e65
1 changed files with 5 additions and 2 deletions
|
|
@ -293,10 +293,13 @@ frappe.unscrub = function(txt) {
|
|||
return frappe.model.unscrub(txt);
|
||||
};
|
||||
|
||||
frappe.get_data_pill = (label, target_id=null, remove_action=null) => {
|
||||
frappe.get_data_pill = (label, target_id=null, remove_action=null, image=null) => {
|
||||
let data_pill_wrapper = $(`
|
||||
<button class="data-pill btn">
|
||||
<span class="pill-label ellipsis">${label}</span>
|
||||
<div class="flex align-center ellipsis">
|
||||
${image ? image : ''}
|
||||
<span class="pill-label ${image ? "ml-2" : ""}">${label}</span>
|
||||
</div>
|
||||
</button>
|
||||
`);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue