Skip to content

Generate new tab after click on the table row #335

Open
@hollabigj

Description

@hollabigj

Not a bug.

I can't find example on generate new tab on your page.

Mine is working but it doesn't generate new tab after you click on the row.

Example:

first component:

<tr {...row.getRowProps()} onClick={ (e) => Test(row.values)} />

second component:

function Test(data) {
      return (
          <>
            {Object.keys(data).map(key =>
              <Tab key={key}>{key}</Tab>
            )}
          </>
      )
}

Third component:

const TabTable = () => {
    return (
        <div>
            <Tabs>
                <TabList>
                    <Tab key="Main">Main</Tab>
                    <Test />
                </TabList>
                <TabPanel>
                    <LoadData />
                </TabPanel>
            </Tabs>
        </div>
    );
}

LoadData is a table.

Yes, I use import Test in TabTable, it's just snippets.

That would be great for people who are new at generating tabs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions