rusackas commented on a change in pull request #15480:
URL: https://github.com/apache/superset/pull/15480#discussion_r671802504



##########
File path: 
superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/FiltersConfigForm.tsx
##########
@@ -705,27 +706,25 @@ const FiltersConfigForm = (
               ]}
               {...getFiltersConfigModalTestId('datasource-input')}
             >
-              <SupersetResourceSelect
-                initialId={initialDatasetId}
-                resource="dataset"
-                searchColumn="table_name"
-                transformItem={datasetToSelectOption}
-                isMulti={false}
-                onError={onDatasetSelectError}
-                defaultOptions={Object.values(loadedDatasets).map(
-                  datasetToSelectOption,
-                )}
-                onChange={e => {
-                  // We need reset column when dataset changed
-                  if (datasetId && e?.value !== datasetId) {
-                    setNativeFilterFieldValues(form, filterId, {
-                      defaultDataMask: null,
-                      column: null,
-                    });
-                  }
-                  forceUpdate();
-                }}
-              />
+              {datasetDetails ? (
+                <DatasetSelect
+                  datasetDetails={datasetDetails}
+                  datasetId={initialDatasetId}
+                  onChange={(value: number) => {
+                    // We need reset column when dataset changed

Review comment:
       ```suggestion
                       // We need to reset the column when the dataset has 
changed
   ```




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