riahk commented on a change in pull request #17372:
URL: https://github.com/apache/superset/pull/17372#discussion_r756330305



##########
File path: superset-frontend/src/filters/components/Range/RangeFilterPlugin.tsx
##########
@@ -197,16 +257,53 @@ export default function RangeFilterPlugin(props: 
PluginFilterRangeProps) {
             onMouseEnter={setFocusedFilter}
             onMouseLeave={unsetFocusedFilter}
           >
-            <Slider
-              range
-              min={min}
-              max={max}
-              value={minMax}
-              onAfterChange={handleAfterChange}
-              onChange={handleChange}
-              tipFormatter={tipFormatter}
-              marks={marks}
-            />
+            {enableSingleMaxValue && (
+              <Slider
+                min={min}
+                max={max}
+                value={minMax[maxIndex]}
+                tipFormatter={tipFormatter}
+                marks={marks}
+                onAfterChange={value => handleAfterChange([min, value])}
+                onChange={value => handleChange([min, value])}
+              />
+            )}
+            {enableSingleMinValue && (
+              <Slider

Review comment:
       As a follow-up to my earlier comment about swapping bg colors: I played 
around with the styles here to give an idea of what that might look like!
   
   ```
   const StyledMinSlider = styled(Slider)`
     .ant-slider-rail {
       background-color: #99e7f0;
     }
   
     .ant-slider-track {
       background-color: #f5f5f5;
     }
   
     &:hover {
       .ant-slider-rail {
         background-color: #99e7f0;
       }
   
       .ant-slider-track {
         background-color: #f5f5f5;
       }
     }
   `;
   ```
   
   Result:
   <img width="253" alt="Screen Shot 2021-11-24 at 10 18 07 AM" 
src="https://user-images.githubusercontent.com/8216382/143293415-fc349827-e1f0-40e2-9126-6f220ece11d8.png";>
   <img width="244" alt="Screen Shot 2021-11-24 at 10 18 12 AM" 
src="https://user-images.githubusercontent.com/8216382/143293418-f6e41def-925e-4d6c-97f5-50e08e4d74ca.png";>
   




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to