reactjs / reactjs/react-tabs

onclick of button how to handle open selected tab

Open
#431 0 comments 1 reaction 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

I have use react-tabs library.
when i click on tab its navigating to particular page its working properly as expected.
now i want to implement same functionality for button click
is this possible to open tab onClick of Button

Syntax:
<Tabs>
<TabList>
<Tab>
//dynamically adding tab here
</Tab>
</TabList>
</Tabs>

i have use one button -initially tab showing index zero position Tab
Now when i am clicking on button that time i want to set its index value 3 .
i want to show active tab index 3 position

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

Start by reviewing the react-tabs usage shown in the issue, especially the Tabs, TabList, and Tab components and how the selected index is controlled. Confirm how a button interaction should select tab index 3 instead of the initial index 0; done means the button reliably displays the tab at index 3.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react
Domain
frontend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.