Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

214
Views
Open an element under a button when the button is clicked in React

Having this design:

enter image description here

There is a table with some rows, when a row is clicked, that kebab button (3 vertical dots) is visible.

When the button is clicked it should open an element which has some data in it - in this case a list of actions.

The part with showing the kebab button is working:

{
  id: 'my-button',
  Cell: ({ cell }: CellProps<MyCell>) => {
    if (cell.row.index === selectedIndex) {
      return (
        <div>
          <Button
            icon={<ThreeDots />}
            onClick={toggleModal}
          />
        </div>
      );
    }
    return <div></div>;
  }
}

when the row is clicked, the 3-dots button is visible. There is also a boolean which is initially set to false but toggles its value when the button is clicked (toggleModal).

But how can that element with the list added under the button?

Done something like:

{isModalOpened ? <div className='absolute'>test</div> : null}

Or maybe is there any online solution to fix this?

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!