0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-27 15:52:39 +00:00

remove some odd if statement in onChange

This commit is contained in:
Gazook89
2024-08-23 22:54:29 -05:00
parent 1f86b4c3d0
commit a351013359

View File

@@ -92,7 +92,7 @@ const ToolBar = ({ onZoomChange, currentPage, onPageChange, totalPages })=>{
inputMode='numeric'
pattern='[0-9]'
value={pageNum}
onChange={(e)=>{setPageNum(e.target.value == false ? e.target.value : parseInt(e.target.value));}}
onChange={(e)=>{setPageNum(parseInt(e.target.value));}}
onBlur={()=>scrollToPage(pageNum)}
onKeyDown={(e)=>{e.key == 'Enter' ? scrollToPage(pageNum) : null;}}
/>