suddjian commented on a change in pull request #10288:
URL:
https://github.com/apache/incubator-superset/pull/10288#discussion_r546192207
##########
File path: superset-frontend/src/explore/controlUtils.js
##########
@@ -66,22 +66,25 @@ export function findControlItem(controlPanelSections,
controlKey) {
);
}
-export const getControlConfig = memoizeOne(function getControlConfig(
- controlKey,
- vizType,
-) {
+const getMemoizedControlConfig = memoizeOne(
+ (controlKey, controlPanelConfig) => {
+ const {
+ controlOverrides = {},
+ controlPanelSections = [],
+ } = controlPanelConfig;
+
+ const control = expandControlConfig(
+ findControlItem(controlPanelSections, controlKey),
+ controlOverrides,
+ );
+ return control?.config || control;
+ },
+);
+
+export const getControlConfig = function getControlConfig(controlKey, vizType)
{
Review comment:
had to change where the memoization was happening, so that it calculates
a new value when the plugin loads
----------------------------------------------------------------
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]