anthonyhungnguyen commented on code in PR #42620:
URL: https://github.com/apache/superset/pull/42620#discussion_r3686200385
##########
superset-frontend/src/SqlLab/components/SaveDatasetModal/index.tsx:
##########
@@ -424,7 +432,7 @@ export const SaveDatasetModal = ({
const filterAutocompleteOption = (
inputValue: string,
option: DatasetOverwriteOption,
- ) => option.value.toLowerCase().includes(inputValue.toLowerCase());
+ ) => option.label.toLowerCase().includes(inputValue.toLowerCase());
Review Comment:
Good catch — you're right, and the regression test I'd written was masking
it: the `SupersetClient.get` stub ignored the request, so the search string
never had to match anything server-side.
Fixed in c800f64. The search string is now split on the first dot and sent
as two filters, `schema` and `table_name` (both are in the dataset API's
`search_columns`), so `prod.task_` reaches the server as `schema ct 'prod'` +
`table_name ct 'task_'` instead of a `table_name` filter that can never match.
`filterAutocompleteOption` mirrors the same split, so the local pass — which
only exists to hide options left over from an earlier search — can't hide a row
the API deliberately returned (e.g. `prod.` vs. schema `production`).
The test now pads the fixture past one API page and applies the rison
filters the way the API does. I checked it's not vacuous: reverting just the
server-side split makes it fail on exactly the scenario you described (the
response comes back empty and the `prod.task_instance` row disappears).
--
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]