You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2021/04/26 10:19:48 UTC

[GitHub] [superset] kgabryje commented on a change in pull request #14346: feat(native-filters): add optional sort metric to select filter

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



##########
File path: superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/FiltersConfigForm.tsx
##########
@@ -115,16 +122,33 @@ export const FiltersConfigForm: React.FC<FiltersConfigFormProps> = ({
   const hasColumn =
     hasDataset && !FILTERS_WITHOUT_COLUMN.includes(formFilter?.filterType);
 
+  const datasetId = formFilter?.dataset?.value;
+
+  useEffect(() => {
+    if (datasetId) {

Review comment:
       We already have access to dataset's saved metrics in `formFilter.dataset?.metrics`




-- 
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org