title: Plotly Dash: Issue with loading static and dynamic graphs in combination
body: <p>Using dash I am trying to load a graph and also generate few other graphs in runtime. Methods I am using in my code are <code>generateMainGraph</code> and <code>generateRuntimeGraph</code>.</p>
  <p>If I use either of the methods alone, it works fine but in a combination, it does not work. Errors I get range from <code>syntax error</code> to <code>The children property of a component is a list of lists, instead of just a list</code>.</p>
  <pre><code>import dash
  import dash_table
  import dash_core_components as dcc
  import dash_html_components as html
  from dash.dependencies import Input, Output, ClientsideFunction
  
  SUBCATEGORY_LIST = [['a1', 'a2'], ['b1', 'b2', 'b3', 'b4'],['c1', 'c2']]
  
  app = dash.Dash(__name__)
      
  def generateSubcategoryCards():
      ddvaluearray = ['a1', 'a2']
      return html.Div(id='dynamic_subparam_card',
          children=[
              dcc.Dropdown(
                  id='dynamic-subparam_dd',
                  options=[{'label': i, 'value': i}
                           for i in ddvaluearray],
                  value=[i for i in ddvaluearray],
                  multi=True,
              ),
              dcc.Graph(id='dynamic_subparam-graph'),
          ],
      ),
  
  def generateMainGraph():
      return html.Div(id=&quot;priority-tab&quot;, children=[
          html.B(&quot;Main Category&quot;),
          dcc.Tabs(id=&quot;tabs-styled-with-inline&quot;, value='tab-graph', children=[
              dcc.Tab(label='Graph Tab', value='tab-graph',   children=[
                          html.Div(id=&quot;pcard&quot;,
                              children=[dcc.Graph(id=&quot;main-graph&quot;)],
                          )
                      ]
                      ),
              dcc.Tab(label='Data Table Tab', value='tab-datatable', children=[
                          html.Div(id=&quot;pcard2&quot;)]
                      ),
          ], 
          ),
          html.Div(id='tabs-content-inline')
      ])
      
  def generateRuntimeGraph(n_value):
      params = SUBCATEGORY_LIST[n_value]
      return html.Div(
          id={
              'type': 'dynamic_subparam_card',
              'index': n_value
          },
          children=[
              html.B(&quot;Subcategory'&quot; + str(n_value) + &quot;' graphs by parameters&quot;),
              dcc.Dropdown(
                  id={
                      'type': 'dynamic-subparam_dd',
                      'index': n_value
                  },
                  options=[{'label': i, 'value': i} for i in params],
                  value=[i for i in params],
                  multi=True,
              ), html.Hr(),
              dcc.Graph(
                  id={
                      'type': 'dynamic_subparam-graph',
                      'index': n_value
                  },
                  figure={}
              ),
          ],
      )
  
  app.layout = html.Div(
      id=&quot;app-container&quot;,
      children=[
          generateMainGraph(), # This works if below method is commented and vice versa
          generateRuntimeGraph(i) for i in range(len(SUBCATEGORY_LIST))
              ]
  )
  
  if __name__ == &quot;__main__&quot;:
      app.run_server(debug=True)
  </code></pre>