DEV Community

sw1085
sw1085

Posted on

1 1

React Customised Table View depending on user logged in - user can add remove columns specific to them as needed

Hi there,

I wonder if someone could help me through this problem.

I have a settings table. Every user has the same starting base settings table with the same number of columns although content is different. It has column A and column B as dimensions to this table.

I have multiple users.

User 1 may want to add via new columns or dimensions to the table with customised headers - they may want 1 or 2 or 3 new columns/dimensions

User 2 may want to add 10 new dimensions to the table with their own customised headers for the columns.

The cell contents would be different for both user 1 and user 2.

How would I manage this in terms of storage? Would you store "settings" for user 1 and user 2 separately in the Postres database and then load these when the user selects the table component?

After this I then have a fact table and users will be able to tag their transactions users the dimensions unique to them in the other settings table.

In the end the final settings table will look completely different depending on the user logged in.

Sentry blog image

How I fixed 20 seconds of lag for every user in just 20 minutes.

Our AI agent was running 10-20 seconds slower than it should, impacting both our own developers and our early adopters. See how I used Sentry Profiling to fix it in record time.

Read more

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay