File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed
src/components/four-range-control Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -305,7 +305,6 @@ const FourRangeControl = memo( props => {
305305
306306 // Other necessary props for steps.
307307 newProps . withInputField = false
308- controlProps . units = false
309308 } else {
310309 newProps . marks = undefined
311310 }
@@ -347,6 +346,18 @@ const FourRangeControl = memo( props => {
347346 ]
348347 }
349348
349+ // Remove the unit picker if not in mark mode for every four range mode
350+ if ( isLocked && ! props . vhMode ) {
351+ controlProps . units = isFourMarkMode . first
352+ ? false : controlProps . units
353+ } else if ( isLocked && props . vhMode ) {
354+ controlProps . units = isFourMarkMode . top && isFourMarkMode . left
355+ ? false : controlProps . units
356+ } else {
357+ controlProps . units = isFourMarkMode . top && isFourMarkMode . right && isFourMarkMode . bottom && isFourMarkMode . left
358+ ? false : controlProps . units
359+ }
360+
350361 // Create step supports for each side
351362 const [ propsToPassFirst , rangeValueFirst , rangeOnChangeFirst ] = stepSupport (
352363 isFourMarkMode . first ,
You can’t perform that action at this time.
0 commit comments