graceguo-supercat commented on a change in pull request #5141: allow add chart from explore
view
URL: https://github.com/apache/incubator-superset/pull/5141#discussion_r193585422
##########
File path: superset/assets/src/dashboard/reducers/getInitialState.js
##########
@@ -92,6 +86,26 @@ export default function(bootstrapData) {
};
sliceIds.add(key);
+
+ // if chart is newly added from explore view,
+ // add a row in layout
+ if (!chartIdToLayoutId[key] && layout[parentId]) {
+ const parent = layout[parentId];
+ const rowContainer = getRowContainer();
+ layout[rowContainer.id] = rowContainer;
+ parent.children.push(rowContainer.id);
+
+ const chartHolder = getChartHolder({
Review comment:
yes. should use newComponentFactory.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
|