@@ -18,7 +18,7 @@ import {
1818} from '@gravity-ui/uikit' ;
1919import { isNil } from 'lodash' ;
2020
21- import { DebouncedInput } from '../../../../../components/DebouncedInput/DebouncedTextInput ' ;
21+ import { DebouncedNumberInput } from '../../../../../components/DebouncedInput/DebouncedNumerInput ' ;
2222import type { PreparedPartitionData } from '../../../../../store/reducers/partitions/types' ;
2323import { formatNumber } from '../../../../../utils/dataFormatters/dataFormatters' ;
2424import { prepareErrorMessage } from '../../../../../utils/prepareErrorMessage' ;
@@ -137,7 +137,7 @@ function TopicDataStartControls({scrollToOffset}: TopicDataStartControlsProps) {
137137 [ handleTopicDataFilterChange , handleSelectedOffsetChange , handleStartTimestampChange ] ,
138138 ) ;
139139 const onStartOffsetChange = React . useCallback (
140- ( value : string ) => {
140+ ( value : number | null ) => {
141141 handleSelectedOffsetChange ( value ) ;
142142 } ,
143143 [ handleSelectedOffsetChange ] ,
@@ -176,19 +176,20 @@ function TopicDataStartControls({scrollToOffset}: TopicDataStartControlsProps) {
176176 </ SegmentedRadioGroup . Option >
177177 </ SegmentedRadioGroup >
178178 { topicDataFilter === 'OFFSET' && (
179- < DebouncedInput
179+ < DebouncedNumberInput
180180 controlRef = { inputRef }
181181 className = { b ( 'offset-input' ) }
182- value = { selectedOffset ? String ( selectedOffset ) : '' }
182+ max = { Number . MAX_SAFE_INTEGER }
183+ min = { 0 }
184+ value = { isNil ( selectedOffset ) ? null : safeParseNumber ( selectedOffset ) }
183185 onUpdate = { onStartOffsetChange }
184186 label = { i18n ( 'label_from' ) }
185187 placeholder = { i18n ( 'label_offset' ) }
186- type = "number"
187188 debounce = { 600 }
188189 endContent = {
189190 < ActionTooltip title = { i18n ( 'action_scroll-selected' ) } >
190191 < Button
191- disabled = { isNil ( selectedOffset ) || selectedOffset === '' }
192+ disabled = { isNil ( selectedOffset ) }
192193 className = { b ( 'scroll-button' ) }
193194 view = "flat-action"
194195 size = "xs"
0 commit comments