villebro commented on a change in pull request #14346:
URL: https://github.com/apache/superset/pull/14346#discussion_r620214782



##########
File path: 
superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/FiltersConfigForm.tsx
##########
@@ -297,6 +320,32 @@ export const FiltersConfigForm: 
React.FC<FiltersConfigFormProps> = ({
         form={form}
         forceUpdate={forceUpdate}
       />
+      {hasMetrics && (
+        <StyledFormItem
+          // don't show the column select unless we have a dataset
+          // style={{ display: datasetId == null ? undefined : 'none' }}
+          name={['filters', filterId, 'sortMetric']}
+          initialValue={filterToEdit?.sortMetric}
+          label={<StyledLabel>{t('Sort Metric')}</StyledLabel>}
+          data-test="field-input"
+        >
+          <SelectControl
+            form={form}
+            filterId={filterId}
+            name="sortMetric"
+            options={metrics.map((metric: Metric) => ({
+              value: metric.metric_name,
+              label: metric.metric_name,

Review comment:
       Thanks @zhaoyongjie ; thanks for catching this!




-- 
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.

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