mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-09 20:29:36 +02:00
fix long press to work only on left click (#1493)
This commit is contained in:
@@ -490,9 +490,6 @@ export const ItemTableListColumn = (props: ItemTableListColumn) => {
|
|||||||
case TableColumn.TRACK_NUMBER:
|
case TableColumn.TRACK_NUMBER:
|
||||||
return <NumericColumn {...props} {...dragProps} controls={controls} type={type} />;
|
return <NumericColumn {...props} {...dragProps} controls={controls} type={type} />;
|
||||||
|
|
||||||
case TableColumn.YEAR:
|
|
||||||
return <YearColumn {...props} {...dragProps} controls={controls} type={type} />;
|
|
||||||
|
|
||||||
case TableColumn.DATE_ADDED:
|
case TableColumn.DATE_ADDED:
|
||||||
return <DateColumn {...props} {...dragProps} controls={controls} type={type} />;
|
return <DateColumn {...props} {...dragProps} controls={controls} type={type} />;
|
||||||
|
|
||||||
@@ -551,6 +548,9 @@ export const ItemTableListColumn = (props: ItemTableListColumn) => {
|
|||||||
case TableColumn.USER_RATING:
|
case TableColumn.USER_RATING:
|
||||||
return <RatingColumn {...props} {...dragProps} controls={controls} type={type} />;
|
return <RatingColumn {...props} {...dragProps} controls={controls} type={type} />;
|
||||||
|
|
||||||
|
case TableColumn.YEAR:
|
||||||
|
return <YearColumn {...props} {...dragProps} controls={controls} type={type} />;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return <DefaultColumn {...props} {...dragProps} controls={controls} type={type} />;
|
return <DefaultColumn {...props} {...dragProps} controls={controls} type={type} />;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -56,6 +56,9 @@ export const useLongPress = <T extends HTMLElement = HTMLElement>({
|
|||||||
|
|
||||||
const handleMouseDown = useCallback(
|
const handleMouseDown = useCallback(
|
||||||
(event: React.MouseEvent) => {
|
(event: React.MouseEvent) => {
|
||||||
|
if (event.button !== 0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
start(event as React.MouseEvent<T>);
|
start(event as React.MouseEvent<T>);
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user