feat(task-management): improve dropdown behavior and enhance task row components

- Updated AssigneeSelector and LabelsSelector to close dropdowns only when scrolling outside the dropdown area, enhancing user experience.
- Introduced TaskLabelsCell component in TaskRow for better label rendering and organization.
- Refactored date handling in TaskRow to consolidate formatted date logic and improve clarity.
- Memoized date picker handlers for better performance and cleaner code.
This commit is contained in:
chamikaJ
2025-07-04 11:01:21 +05:30
parent 8adeabce61
commit 6f66367282
3 changed files with 121 additions and 123 deletions

View File

@@ -88,10 +88,12 @@ const AssigneeSelector: React.FC<AssigneeSelectorProps> = ({
}
};
const handleScroll = () => {
const handleScroll = (event: Event) => {
if (isOpen) {
// Close dropdown when scrolling to prevent it from moving with the content
setIsOpen(false);
// Only close dropdown if scrolling happens outside the dropdown
if (dropdownRef.current && !dropdownRef.current.contains(event.target as Node)) {
setIsOpen(false);
}
}
};