mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-07 04:20:12 +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:
|
||||
return <NumericColumn {...props} {...dragProps} controls={controls} type={type} />;
|
||||
|
||||
case TableColumn.YEAR:
|
||||
return <YearColumn {...props} {...dragProps} controls={controls} type={type} />;
|
||||
|
||||
case TableColumn.DATE_ADDED:
|
||||
return <DateColumn {...props} {...dragProps} controls={controls} type={type} />;
|
||||
|
||||
@@ -551,6 +548,9 @@ export const ItemTableListColumn = (props: ItemTableListColumn) => {
|
||||
case TableColumn.USER_RATING:
|
||||
return <RatingColumn {...props} {...dragProps} controls={controls} type={type} />;
|
||||
|
||||
case TableColumn.YEAR:
|
||||
return <YearColumn {...props} {...dragProps} controls={controls} type={type} />;
|
||||
|
||||
default:
|
||||
return <DefaultColumn {...props} {...dragProps} controls={controls} type={type} />;
|
||||
}
|
||||
|
||||
@@ -56,6 +56,9 @@ export const useLongPress = <T extends HTMLElement = HTMLElement>({
|
||||
|
||||
const handleMouseDown = useCallback(
|
||||
(event: React.MouseEvent) => {
|
||||
if (event.button !== 0) {
|
||||
return;
|
||||
}
|
||||
event.preventDefault();
|
||||
start(event as React.MouseEvent<T>);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user