feat: allow bulk select and delete on activities and deal list
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -4,9 +4,15 @@ export function cardMenuStyle(
|
||||
width = 160,
|
||||
height = 230,
|
||||
): Record<string, string> | null {
|
||||
const btn = document.querySelector<HTMLElement>(
|
||||
`[data-card-id="${CSS.escape(cardId)}"] .menu`,
|
||||
const buttons = Array.from(
|
||||
document.querySelectorAll<HTMLElement>(`[data-card-id="${CSS.escape(cardId)}"] .menu`),
|
||||
);
|
||||
// در نمای لیست هم جدول و هم کارت در DOM هستند؛ دکمهٔ واقعاً دیده را بگیر
|
||||
const btn =
|
||||
buttons.find((el) => {
|
||||
const r = el.getBoundingClientRect();
|
||||
return r.width > 0 && r.height > 0;
|
||||
}) ?? buttons[0];
|
||||
if (!btn) return null;
|
||||
const r = btn.getBoundingClientRect();
|
||||
const gap = 4;
|
||||
|
||||
Reference in New Issue
Block a user