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:
Abdul Rahman
2025-06-09 18:50:13 +05:30
committed by GitHub
parent da35a2f479
commit 1f2c40af61
7 changed files with 69 additions and 6 deletions

View File

@ -0,0 +1,8 @@
import { createRequiredContext } from '~/utils/createRequiredContext';
type RightDrawerContextType = {
isInRightDrawer: boolean;
};
export const [RightDrawerProvider, useIsInRightDrawerOrThrow] =
createRequiredContext<RightDrawerContextType>('RightDrawer');