hikaya-io / hakawati

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

issue-313: Fix editing data when it is sorted #318

Closed Kimaiyo077 closed 2 years ago

Kimaiyo077 commented 2 years ago

What is the Purpose?

Fixes issues experienced when editing a sorted table.

What was the approach?

Re-sorted tableData when it is updated after an edit is completed

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?

@amosnjoroge @ninetteadhikari @michaelbukachi

Issue(s) affected?

Closes #313

netlify[bot] commented 2 years ago

Deploy Preview for hakawati ready!

Name Link
Latest commit f2d3a0abd72c6e0db0e1d776c7c7b0fe8d527033
Latest deploy log https://app.netlify.com/sites/hakawati/deploys/62a83cd71d54e3000886fe91
Deploy Preview https://deploy-preview-318--hakawati.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

amosnjoroge commented 2 years ago

Hi @Kimaiyo077 when I edit a sorted table it is still referencing to the unsorted row and updating its value. editing sorted table

Kimaiyo077 commented 2 years ago

@amosnjoroge I am not able to reproduce the issue you have mentioned. I am able to edit the table as expected. @andrewtpham @ninetteadhikari Could you please try it on your end?

amosnjoroge commented 2 years ago

@amosnjoroge I am not able to reproduce the issue you have mentioned. I am able to edit the table as expected. @andrewtpham @ninetteadhikari Could you please try it on your end?

@Kimaiyo077 try editing the same column that was sorted. For example, sort by the name column and then edit one of the values on that column.

Kimaiyo077 commented 2 years ago

@amosnjoroge, the sorting should work now with the empty values. @michaelbukachi could you please take a look at the code?

amosnjoroge commented 2 years ago

Tested and it looks good. @michaelbukachi please review it and merge id it is okay. Thanks