hikaya-io / hakawati

A collection of UI components
GNU General Public License v3.0
2 stars 1 forks source link

issue-348: Fix data repeating when columns are rearranged #353

Closed Kimaiyo077 closed 2 years ago

Kimaiyo077 commented 2 years ago

What is the Purpose?

It fixes the issue where data was being duplicated when columns are rearranged rearrange-column

What was the approach?

Updated the key value

Are there any concerns to addressed further before or after merging this PR?

State some additional info if any. For instance running install or setting some environment variable(s)

Mentions?

@andrewtpham @michaelbukachi

Issue(s) affected?

Closes #348

Kimaiyo077 commented 2 years ago

@michaelbukachi I was trying out different ways to fix and somehow changing the key worked. I don't know how or why so if you could please take a deeper look at it maybe you might know why it worked? I have attached a GIF from @andrewtpham that shows the error clearly on Dots

ninetteadhikari commented 2 years ago

@michaelbukachi if you can take a look at the PR and know of any explanation on how the table key is solving the issue let us know.

michaelbukachi commented 2 years ago

@Kimaiyo077 This worked because we had multiple cases of keys with the value thead_${index} in the page. Adding the col value to the key made it unique so no duplicates.