react-draggable-tabs icon indicating copy to clipboard operation
react-draggable-tabs copied to clipboard

Calling handleTabAddButtonClick from ListItem in Drawer (Menu Bar)

Open emadhanna opened this issue 5 years ago • 1 comments

I guess I successfully used the TabView using the react-draggable-tab library. Now I'm stuck with using the ListItem component. When I click on any ListItem in that "Contents.js" file, I want it to create a new tab using the "handleTabAddButtonClick" method. I have attached both files. in them in this email. But when I try to add the "onClick" event, it is not working. I have refactored the coding for the "Contents.js" to be Class-based. Even the sample code for one of the LustItems is not working when calling the console.log E.g. <ListItem button key='Reserve' onClick={console.log('Reserve ListItem Is Clicked')}> I know I have to create a reference to the Tabs instance. But I'm sorry I'm still struggling with that part. I tried the following code but not working: From the top of the class I tried to create the following object: let tabs = new TabList() {/* <ListItem button key='Reserve' onClick={() => tabList.handleTabAddButtonClick(tabs.tabs,'Reserve','

This is Reserve Tab

')}> /} {/ <ListItem button key='Reserve' onClick={handleClick(tabList, "Reserve", '

This is Reserve Tab

')}> */}

Can you please help me with that.

emadhanna avatar Jun 20 '19 18:06 emadhanna

Issue Label Bot is not confident enough to auto-label this issue. See dashboard for more details.

issue-label-bot[bot] avatar Jun 20 '19 18:06 issue-label-bot[bot]