Skip to content

Commit

Permalink
Fix case detail context menu (#649)
Browse files Browse the repository at this point in the history
* fix: hide case detail contextMenu

* fix: hide case detail contextMenu

---------

Co-authored-by: onePone <[email protected]>
  • Loading branch information
1pone and Xremn authored Mar 27, 2024
1 parent e47ee13 commit 506e9e2
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 8 deletions.
6 changes: 3 additions & 3 deletions packages/arex-core/src/components/DiffJsonView/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export type OnRenderContextMenu = (
path: string[],
value: unknown,
target: TargetEditor,
) => ContextMenuItem[] | undefined;
) => ContextMenuItem[] | false | undefined;

export type DiffJsonViewProps = {
readOnly?: boolean;
Expand Down Expand Up @@ -88,7 +88,7 @@ const DiffJsonView = forwardRef<DiffJsonViewRef, DiffJsonViewProps>((props, ref)
context.selection.path,
context.value,
TargetEditor.LEFT,
) || items
) ?? items
}
/>
</div>
Expand All @@ -110,7 +110,7 @@ const DiffJsonView = forwardRef<DiffJsonViewRef, DiffJsonViewProps>((props, ref)
context.selection.path,
context.value,
TargetEditor.RIGHT,
) || items
) ?? items
}
/>
</div>
Expand Down
1 change: 1 addition & 0 deletions packages/arex/src/panes/ReplayCaseDetail/CaseDetailTab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ const CaseDetailTab: FC<CaseDetailTabProps> = (props) => {
left: t('request', { ns: 'common' }),
right: t('response', { ns: 'common' }),
}}
onRenderContextMenu={() => false}
/>
),
}))}
Expand Down
4 changes: 2 additions & 2 deletions packages/arex/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ export default defineConfig(async ({ mode }) => {
resolve: {
alias: {
'@': path.resolve('./src'),
'@arextest/arex-core/dist': path.resolve('../arex-core/src'),
'@arextest/arex-core': path.resolve('../arex-core/src'),
// '@arextest/arex-core/dist': path.resolve('../arex-core/src'),
// '@arextest/arex-core': path.resolve('../arex-core/src'),
// '@arextest/arex-request': path.resolve('../arex-request/src'),
},
},
Expand Down
3 changes: 0 additions & 3 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 506e9e2

Please sign in to comment.