fix: prevent duplicate dropdowns in activity targets when editing in different contexts (#12462)
Closes #12361 ### Changes Made - In `ActivityTargetsInlineCell`, we now use different component instance IDs based on context. This ensures that each instance of the component (whether in right drawer or main view) has its own isolated state, preventing state conflicts and duplicate dropdowns. - The `MultipleRecordPicker` component now properly resets its state when closed, preventing state leakage between instances. https://github.com/user-attachments/assets/deb99687-a803-417e-a339-cab061026739
This commit is contained in:
@ -0,0 +1,8 @@
|
||||
import { createRequiredContext } from '~/utils/createRequiredContext';
|
||||
|
||||
type RightDrawerContextType = {
|
||||
isInRightDrawer: boolean;
|
||||
};
|
||||
|
||||
export const [RightDrawerProvider, useIsInRightDrawerOrThrow] =
|
||||
createRequiredContext<RightDrawerContextType>('RightDrawer');
|
||||
Reference in New Issue
Block a user