fix: link filters UX

This commit is contained in:
barredterra 2025-12-09 14:37:07 +01:00
parent dfd956f236
commit dbc144595c
2 changed files with 9 additions and 2 deletions

View file

@ -315,6 +315,11 @@ frappe.ui.form.ControlLink = class ControlLink extends frappe.ui.form.ControlDat
return false;
}
if (item.value === "filter_description__link_option") {
e.preventDefault();
return false;
}
if (item.action) {
item.value = "";
item.label = "";
@ -384,8 +389,7 @@ frappe.ui.form.ControlLink = class ControlLink extends frappe.ui.form.ControlDat
if (filter_string) {
r.message.push({
html: `<span class="text-muted" style="line-height: 1.5">${filter_string}</span>`,
value: "",
action: () => {},
value: "filter_description__link_option",
});
}

View file

@ -37,6 +37,9 @@
& > li,
& > [role="option"] {
&:has(p[title="filter_description__link_option"]) {
cursor: default;
}
cursor: pointer;
@include get_textstyle("sm", "regular");
padding: var(--padding-sm);