mirror of
https://github.com/jeffvli/feishin.git
synced 2026-06-12 07:12:58 +02:00
handle non-list items contextmenu in controls
This commit is contained in:
@@ -183,11 +183,12 @@ const CompactItemCard = ({
|
||||
};
|
||||
|
||||
const handleContextMenu = (e: React.MouseEvent<HTMLDivElement>) => {
|
||||
if (!data || !controls || !internalState) {
|
||||
if (!data || !controls) {
|
||||
return;
|
||||
}
|
||||
|
||||
e.preventDefault();
|
||||
|
||||
controls.onMore?.({
|
||||
event: e,
|
||||
internalState,
|
||||
@@ -337,11 +338,12 @@ const DefaultItemCard = ({
|
||||
};
|
||||
|
||||
const handleContextMenu = (e: React.MouseEvent<HTMLDivElement>) => {
|
||||
if (!data || !controls || !internalState) {
|
||||
if (!data || !controls) {
|
||||
return;
|
||||
}
|
||||
|
||||
e.preventDefault();
|
||||
|
||||
controls.onMore?.({
|
||||
event: e,
|
||||
internalState,
|
||||
@@ -536,11 +538,12 @@ const PosterItemCard = ({
|
||||
};
|
||||
|
||||
const handleContextMenu = (e: React.MouseEvent<HTMLDivElement>) => {
|
||||
if (!data || !controls || !internalState) {
|
||||
if (!data || !controls) {
|
||||
return;
|
||||
}
|
||||
|
||||
e.preventDefault();
|
||||
|
||||
controls.onMore?.({
|
||||
event: e,
|
||||
internalState,
|
||||
|
||||
Reference in New Issue
Block a user