justinpark commented on code in PR #24599:
URL: https://github.com/apache/superset/pull/24599#discussion_r1263078925
##########
superset-frontend/src/features/datasets/AddDataset/LeftPanel/index.tsx:
##########
@@ -239,140 +156,39 @@ export default function LeftPanel({
}
}, [setDatabase]);
- useEffect(() => {
- if (loadTables) {
- const params = rison.encode({
- force: refresh,
- schema_name: encodedSchema,
- });
-
- const endpoint =
`/api/v1/database/${dataset?.db?.id}/tables/?q=${params}`;
- getTablesList(endpoint);
- }
- }, [loadTables, dataset?.db?.id, encodedSchema, getTablesList, refresh]);
-
- useEffect(() => {
- if (resetTables) {
- setTableOptions([]);
- setResetTables(false);
- }
- }, [resetTables]);
-
- const filteredOptions = tableOptions.filter(option =>
- option?.value?.toLowerCase().includes(searchVal.toLowerCase()),
- );
-
- const Loader = (inline: string) => (
- <div className="loading-container">
- <Loading position="inline" />
- <p>{inline}</p>
- </div>
+ const datasetNamesSet = datasetNames?.join(divider);
Review Comment:
The purpose of using concatenated string is avoiding the re-rendering by the
reference differences because it will shallowly comparing only values given the
different reference of datasetNames passing from the property
--
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]