@@ -332,6 +332,9 @@ export const FilterButton = ({
332332 } , [ activeRangeFilters , sectionKey ] ) ;
333333
334334 const handleChange = ( values : [ number , number ] ) => {
335+ if ( values [ 0 ] > values [ 1 ] ) {
336+ return ;
337+ }
335338 setSelectedSidebarFilters ( ( prev ) => ( {
336339 ...prev ,
337340 [ sectionKey ] : { min : values [ 0 ] , max : values [ 1 ] } ,
@@ -358,25 +361,15 @@ export const FilterButton = ({
358361 </ button >
359362 ) }
360363 { type === "range" && (
361- < div className = "tv-p -3" >
364+ < div className = "tv-pb -3" >
362365 < div className = "tv-flex tv-flex-col tv-gap-2" >
363- < TwoThumbInputRange
364- onChange = { handleChange }
365- values = { [ min , max ] }
366- min = { range ?. min ?? 0 }
367- max = { range ?. max ?? 10000 }
368- trackColor = { getCssVar ( "--tv-prop-brand-color" ) }
369- thumbColor = { getCssVar ( "--tv-prop-brand-color" ) }
370- showLabels = { false }
371- />
372- < div className = "flex justify-between items-center gap-3 mt-1" >
373- < div className = "tv-flex tv-justify-between tv-items-center tv-gap-3 tv-mt-1" >
366+ < div className = "tv-flex tv-justify-between tv-items-center tv-gap-3" >
374367 < div className = "tv-relative tv-flex-1" >
375- < div className = "tv-flex tv-items-center tv-rounded-md tv-border tv-border-gray-200 tv-bg-gray-50 tv-overflow-hidden" >
368+ < div className = "tv-w-[90%] tv- flex tv-items-center tv-rounded-md tv-border tv-border-gray-200 tv-bg-gray-50 tv-overflow-hidden" >
376369 < span className = "tv-pl-3 tv-pr-1 tv-text-gray-500" > $</ span >
377370 < input
378371 type = "number"
379- className = "tv-w-full tv-p-2 tv-bg-transparent tv- focus:outline-none"
372+ className = "tv-w-full ! tv-shadow-none tv-bg-transparent focus:tv- outline-none tv-outline-none tv-border -none"
380373 value = { min }
381374 onChange = { ( e ) => handleChange ( [ parseInt ( e . target . value ) , max ] ) }
382375 />
@@ -388,19 +381,32 @@ export const FilterButton = ({
388381 </ div >
389382
390383 < div className = "tv-relative tv-flex-1" >
391- < div className = "tv-flex tv-items-center tv-rounded-md tv-border tv-border-gray-200 tv-bg-gray-50 tv-overflow-hidden" >
384+ < div className = "tv-w-[90%] tv- flex tv-items-center tv-rounded-md tv-border tv-border-gray-200 tv-bg-gray-50 tv-overflow-hidden" >
392385 < span className = "tv-pl-3 tv-pr-1 tv-text-gray-500" > $</ span >
393386 < input
394387 type = "number"
395- className = "tv-w-full tv-p-2 tv-bg-transparent tv-focus:outline-none"
388+ className = "tv-w-full ! tv-shadow-none tv-bg-transparent tv-focus:outline-none"
396389 value = { max }
397390 onChange = { ( e ) => handleChange ( [ min , parseInt ( e . target . value ) ] ) }
398391 />
399392 </ div >
400393 </ div >
401394 </ div >
395+ < div className = "tv-mt-1 tv-w-[100%]" >
396+ < TwoThumbInputRange
397+ onChange = { handleChange }
398+ values = { [ min , max ] }
399+ min = { range ?. min ?? 0 }
400+ max = { range ?. max ?? 10000 }
401+ trackColor = { getCssVar ( "--tv-prop-brand-color" ) }
402+ thumbColor = { getCssVar ( "--tv-prop-brand-color" ) }
403+ showLabels = { false }
404+ inputStyle = { {
405+ "width" : "225px"
406+ } }
407+ />
408+ </ div >
402409 </ div >
403- </ div >
404410 </ div >
405411 ) }
406412 </ >
0 commit comments