reactjs / reactjs/react-tabs

Generate new tab after click on the table row

Open
#335 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
3.1k
Forks
455
Avg merge
5h 9m
Merged PRs (30d)
2

Description

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.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Review the existing React tabs documentation alongside the JavaScript snippets in this issue. Determine where an example for opening or generating a new tab after clicking a table row belongs, and consider the documentation complete when newcomers can find a working example covering this interaction.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react
Domain
documentation, frontend
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.