carlqt
2/14/2017 - 1:46 PM

snippet issue for MUICSS Tab

snippet issue for MUICSS Tab

  // this is the simple tab snippet to render.
  render() {
    return (
      <Tabs justified={true}>
        <Tab value="pane-1" label="Tab 1">Pane-1</Tab>
        {this.newInstanceTab(false)}
      </Tabs>
    );

  
  
  // this is newInstanceTab method
  newInstanceTab(flag) {
    if (flag) {
      return (
        <Tab value="pane-2" label="Tab 2">Pane-2</Tab>
      )
    }
  }
  
  // I want to hide the Pane-2 tab if the flag is false