mirror of
https://github.com/idanoo/autobrr
synced 2025-07-23 00:39:13 +00:00
enhancement(web): force run feed with enter key (#1329)
This commit is contained in:
parent
57a91bb99a
commit
89c146b762
1 changed files with 6 additions and 1 deletions
|
@ -151,7 +151,7 @@ export const ForceRunModal: FC<ForceRunModalProps> = (props: ForceRunModalProps)
|
|||
}, 200);
|
||||
};
|
||||
|
||||
const handleForceRun = (e: React.MouseEvent<HTMLButtonElement>) => {
|
||||
const handleForceRun = (e: React.SyntheticEvent) => {
|
||||
e.preventDefault();
|
||||
if (props.isOpen && isInputCorrect) {
|
||||
props.forceRunAction();
|
||||
|
@ -211,6 +211,11 @@ export const ForceRunModal: FC<ForceRunModalProps> = (props: ForceRunModalProps)
|
|||
placeholder="Type 'I understand' to enable the button"
|
||||
value={inputValue}
|
||||
onChange={(e) => setInputValue(e.target.value)}
|
||||
onKeyDown={(e) => {
|
||||
if (e.key === "Enter") {
|
||||
handleForceRun(e);
|
||||
}
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue