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:
@@ -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);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user