mi6 / mi6/ic-ui-kit

Cell density dropdown not updating correctly in ic-data-table-title-bar

Open
#3,016 1 comment 0 reactions 0 assignees View on GitHub
data-table component
Dominant language
TypeScript
Stars
53
Forks
63
Avg merge
2d 4h
Merged PRs (30d)
15

Description

## Summary of the bug
In the React storybook playground, when setting the table density via the title-bar dropdown, the value does not update if the prop is changed manually through the playground. Additionally, triggering certain boolean props in the playground causes the density to reset to the prop's manually set value, not the one in the dropdown.

## 🪜 How to reproduce
Tell us the steps to reproduce the problem:
1. Go to page the canary-react storybook playground.
2. Select `dense` from the dropdown
3. Update the `density` prop or any boolean prop
4. See the error

## 🧐 Expected behaviour
The dropdown should keep the up-to-date value, and should not be reset by unrelated prop changes.

Contributor guide

Open the contributing guide

Research direction

Start in the canary-react Storybook playground and inspect the ic-data-table-title-bar density dropdown while changing the density and boolean props. Reproduce the reset and synchronization cases described in the issue; done means the dropdown reflects manual density changes and remains unchanged when unrelated props are updated.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, storybook, typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.