@@ -297,37 +297,31 @@ export const NumberInputV2 = forwardRef(
297297 [ localRef , min , onChange ] ,
298298 )
299299
300- const isMinusDisabled = useMemo (
301- ( ) => {
302- if ( ! localRef ?. current ?. value || localRef ?. current ?. value === '' ) {
303- return false
304- }
300+ const isMinusDisabled = useMemo ( ( ) => {
301+ if ( ! localRef ?. current ?. value || localRef ?. current ?. value === '' ) {
302+ return false
303+ }
305304
306- const numericValue = Number ( localRef ?. current ?. value )
307- if ( Number . isNaN ( numericValue ) ) return false
305+ const numericValue = Number ( localRef ?. current ?. value )
306+ if ( Number . isNaN ( numericValue ) ) return false
308307
309- const minValue = typeof min === 'number' ? min : Number ( min )
308+ const minValue = typeof min === 'number' ? min : Number ( min )
310309
311- return Number . isNaN ( numericValue ) || numericValue <= minValue
312- } , // eslint-disable-next-line react-hooks/exhaustive-deps
313- [ localRef ?. current ?. value , min ] ,
314- )
310+ return Number . isNaN ( numericValue ) || numericValue <= minValue
311+ } , [ localRef ?. current ?. value , min ] )
315312
316- const isPlusDisabled = useMemo (
317- ( ) => {
318- if ( ! localRef ?. current ?. value || localRef ?. current ?. value === '' ) {
319- return false
320- }
313+ const isPlusDisabled = useMemo ( ( ) => {
314+ if ( ! localRef ?. current ?. value || localRef ?. current ?. value === '' ) {
315+ return false
316+ }
321317
322- const numericValue = Number ( localRef ?. current ?. value )
323- if ( Number . isNaN ( numericValue ) ) return false
318+ const numericValue = Number ( localRef ?. current ?. value )
319+ if ( Number . isNaN ( numericValue ) ) return false
324320
325- const maxValue = typeof max === 'number' ? max : Number ( max )
321+ const maxValue = typeof max === 'number' ? max : Number ( max )
326322
327- return numericValue >= maxValue
328- } , // eslint-disable-next-line react-hooks/exhaustive-deps
329- [ localRef ?. current ?. value , max ] ,
330- )
323+ return numericValue >= maxValue
324+ } , [ localRef ?. current ?. value , max ] )
331325
332326 const helperSentiment = useMemo ( ( ) => {
333327 if ( error ) {
0 commit comments