@@ -18,7 +18,7 @@ import {
18
18
} from '@gravity-ui/uikit' ;
19
19
import { isNil } from 'lodash' ;
20
20
21
- import { DebouncedInput } from '../../../../../components/DebouncedInput/DebouncedTextInput ' ;
21
+ import { DebouncedNumberInput } from '../../../../../components/DebouncedInput/DebouncedNumerInput ' ;
22
22
import type { PreparedPartitionData } from '../../../../../store/reducers/partitions/types' ;
23
23
import { formatNumber } from '../../../../../utils/dataFormatters/dataFormatters' ;
24
24
import { prepareErrorMessage } from '../../../../../utils/prepareErrorMessage' ;
@@ -137,7 +137,7 @@ function TopicDataStartControls({scrollToOffset}: TopicDataStartControlsProps) {
137
137
[ handleTopicDataFilterChange , handleSelectedOffsetChange , handleStartTimestampChange ] ,
138
138
) ;
139
139
const onStartOffsetChange = React . useCallback (
140
- ( value : string ) => {
140
+ ( value : number | null ) => {
141
141
handleSelectedOffsetChange ( value ) ;
142
142
} ,
143
143
[ handleSelectedOffsetChange ] ,
@@ -176,19 +176,20 @@ function TopicDataStartControls({scrollToOffset}: TopicDataStartControlsProps) {
176
176
</ SegmentedRadioGroup . Option >
177
177
</ SegmentedRadioGroup >
178
178
{ topicDataFilter === 'OFFSET' && (
179
- < DebouncedInput
179
+ < DebouncedNumberInput
180
180
controlRef = { inputRef }
181
181
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 ) }
183
185
onUpdate = { onStartOffsetChange }
184
186
label = { i18n ( 'label_from' ) }
185
187
placeholder = { i18n ( 'label_offset' ) }
186
- type = "number"
187
188
debounce = { 600 }
188
189
endContent = {
189
190
< ActionTooltip title = { i18n ( 'action_scroll-selected' ) } >
190
191
< Button
191
- disabled = { isNil ( selectedOffset ) || selectedOffset === '' }
192
+ disabled = { isNil ( selectedOffset ) }
192
193
className = { b ( 'scroll-button' ) }
193
194
view = "flat-action"
194
195
size = "xs"
0 commit comments