#UI where a user selects an item in a table and a details panel opens up to the side? (like asana)

4 messages · Page 1 of 1 (latest)

odd granite
#

I'm looking to implement an asana-like UI where a user selects an item from a table and a details panel will open up to the side. My current setup causes a page refresh when I select an item.

I'm having trouble figuring out how to go about routing this setup. Each row in the table has a Link item in it. The root page containing the table is something.com/items When a user selects an item the address should be something.com/items/[selectionId]. selectionId is the DB id of the selected item.

I've tried router..push w/ shallow also, but the refresh still seems to happen.

I have my pages set up like this:

- pages
-- items
--- [selectionId].tsx
--- index.tsx
index.tsx
...
  return (
    <ItemsPageContainer title={'Items'}>
      <div className="relative flex h-full w-full flex-row space-y-6">
        <Items organization={organization} />
      </div>
    </ItemsPageContainer >
  )
...
[selectionId].tsx
...
  return (
    <ItemsPageContainer title={'Items'}>
      <div className="relative flex h-full w-full flex-row space-y-6">
        <Items organization={organization} />
        <DetailsPane /> // Adds details pane
      </div>
    </ItemsPageContainer >
  )
...
tough cipher
odd granite
#

amazing! Thanks, @tough cipher, this looks promising. Will try it out today

odd granite
#

yep, that did the trick. After messing around with it for a while it all clicked. Thanks again!