0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2026-01-06 10:02:43 +00:00

dynamic text input width to match characters

This commit is contained in:
Gazook89
2024-11-07 19:46:07 -06:00
parent 650ec04417
commit 28855d02a6
2 changed files with 2 additions and 1 deletions

View File

@@ -238,6 +238,7 @@ const ToolBar = ({ displayOptions, onDisplayOptionsChange, visiblePages, totalPa
onChange={(e)=>handlePageInput(e.target.value)}
onBlur={()=>scrollToPage(pageNum)}
onKeyDown={(e)=>e.key == 'Enter' && scrollToPage(pageNum)}
style={{ width: `${pageNum.length}ch` }}
/>
<span id='page-count' title='Total Page Count'>/ {totalPages}</span>
</div>