0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2026-01-06 20:52:40 +00:00

dynamic input width

This commit is contained in:
Víctor Losada Hernández
2024-10-11 00:32:28 +02:00
parent 2118142faa
commit 3e6884b506
2 changed files with 4 additions and 3 deletions

View File

@@ -139,6 +139,7 @@ const ToolBar = ({ onZoomChange, currentPage, onPageChange, totalPages })=>{
name='page'
inputMode='numeric'
pattern='[0-9]'
style={{width:`${pageNum.toString().length + 2}ch`}}
value={pageNum}
onClick={(e)=>e.target.select()}
onChange={(e)=>handlePageInput(e.target.value)}