mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-09 20:29:36 +02:00
disable bugged react-hooks rules
This commit is contained in:
@@ -27,6 +27,8 @@ export default tseslint.config(
|
|||||||
rules: {
|
rules: {
|
||||||
...eslintPluginReactHooks.configs.recommended.rules,
|
...eslintPluginReactHooks.configs.recommended.rules,
|
||||||
...eslintPluginReactRefresh.configs.vite.rules,
|
...eslintPluginReactRefresh.configs.vite.rules,
|
||||||
|
'react-hooks/set-state-in-effect': 'off',
|
||||||
|
'react-hooks/refs': 'off',
|
||||||
'@typescript-eslint/explicit-function-return-type': 'off',
|
'@typescript-eslint/explicit-function-return-type': 'off',
|
||||||
'@typescript-eslint/no-duplicate-enum-values': 'off',
|
'@typescript-eslint/no-duplicate-enum-values': 'off',
|
||||||
'@typescript-eslint/no-explicit-any': 'off',
|
'@typescript-eslint/no-explicit-any': 'off',
|
||||||
|
|||||||
@@ -1249,9 +1249,7 @@ export const ItemTableList = ({
|
|||||||
behavior: 'instant',
|
behavior: 'instant',
|
||||||
left: scrollLeft,
|
left: scrollLeft,
|
||||||
});
|
});
|
||||||
setTimeout(() => {
|
isScrolling.row = false;
|
||||||
isScrolling.row = false;
|
|
||||||
}, 0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Sync from main content to header and sticky columns
|
// Sync from main content to header and sticky columns
|
||||||
@@ -1282,11 +1280,9 @@ export const ItemTableList = ({
|
|||||||
top: scrollTop,
|
top: scrollTop,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
setTimeout(() => {
|
isScrolling.header = false;
|
||||||
isScrolling.header = false;
|
isScrolling.pinnedLeft = false;
|
||||||
isScrolling.pinnedLeft = false;
|
isScrolling.pinnedRight = false;
|
||||||
isScrolling.pinnedRight = false;
|
|
||||||
}, 0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Sync vertical scroll between left pinned column and main content (only if pinnedLeft exists)
|
// Sync vertical scroll between left pinned column and main content (only if pinnedLeft exists)
|
||||||
@@ -1296,9 +1292,7 @@ export const ItemTableList = ({
|
|||||||
behavior: 'instant',
|
behavior: 'instant',
|
||||||
top: scrollTop,
|
top: scrollTop,
|
||||||
});
|
});
|
||||||
setTimeout(() => {
|
isScrolling.row = false;
|
||||||
isScrolling.row = false;
|
|
||||||
}, 0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Sync vertical scroll between right pinned column and main content (only if pinnedRight exists)
|
// Sync vertical scroll between right pinned column and main content (only if pinnedRight exists)
|
||||||
@@ -1308,9 +1302,7 @@ export const ItemTableList = ({
|
|||||||
behavior: 'instant',
|
behavior: 'instant',
|
||||||
top: scrollTop,
|
top: scrollTop,
|
||||||
});
|
});
|
||||||
setTimeout(() => {
|
isScrolling.row = false;
|
||||||
isScrolling.row = false;
|
|
||||||
}, 0);
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -149,15 +149,11 @@ export const MpvPlayerEngine = (props: MpvPlayerEngineProps) => {
|
|||||||
if (currentSrc) {
|
if (currentSrc) {
|
||||||
// Set current song at position 0 and next song at position 1
|
// Set current song at position 0 and next song at position 1
|
||||||
mpvPlayer.setQueue(currentSrc, nextSrc, playerStatus !== PlayerStatus.PLAYING);
|
mpvPlayer.setQueue(currentSrc, nextSrc, playerStatus !== PlayerStatus.PLAYING);
|
||||||
setTimeout(() => {
|
setPreviousCurrentSrc(currentSrc);
|
||||||
setPreviousCurrentSrc(currentSrc);
|
|
||||||
}, 0);
|
|
||||||
} else {
|
} else {
|
||||||
// Clear queue if no current song
|
// Clear queue if no current song
|
||||||
mpvPlayer.setQueue(undefined, undefined, true);
|
mpvPlayer.setQueue(undefined, undefined, true);
|
||||||
setTimeout(() => {
|
setPreviousCurrentSrc(undefined);
|
||||||
setPreviousCurrentSrc(undefined);
|
|
||||||
}, 0);
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// If currentSrc hasn't changed but nextSrc has, update position 1
|
// If currentSrc hasn't changed but nextSrc has, update position 1
|
||||||
|
|||||||
@@ -32,10 +32,8 @@ export const SearchInput = ({
|
|||||||
() => {
|
() => {
|
||||||
if (enableHotkey) {
|
if (enableHotkey) {
|
||||||
setIsInputMode(true);
|
setIsInputMode(true);
|
||||||
setTimeout(() => {
|
ref?.current?.focus();
|
||||||
ref?.current?.focus();
|
ref?.current?.select();
|
||||||
ref?.current?.select();
|
|
||||||
}, 0);
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
|||||||
Reference in New Issue
Block a user