Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(table): enhance table with generics #919

Merged
merged 30 commits into from
Jun 7, 2024

Conversation

mlmoravek
Copy link
Member

@mlmoravek mlmoravek commented May 1, 2024

Fixes #701
Fixes #924

Proposed Changes

  • add generic to table
    • update props
    • update emits
  • wrap table data into object mapping
  • add processed emit which emits every time after the rows got processed
  • refactor table
  • update export types
  • update examples

@mlmoravek mlmoravek added the enhancement New feature or request label May 1, 2024
Copy link

netlify bot commented May 1, 2024

Deploy Preview for oruga-documentation-preview ready!

Name Link
🔨 Latest commit 49d7feb
🔍 Latest deploy log https://app.netlify.com/sites/oruga-documentation-preview/deploys/66630f3dc1688800081ddd43
😎 Deploy Preview https://deploy-preview-919--oruga-documentation-preview.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 configuration.

Copy link

codecov bot commented May 1, 2024

Codecov Report

Attention: Patch coverage is 0% with 221 lines in your changes missing coverage. Please review.

Project coverage is 18.32%. Comparing base (484cfe8) to head (059117e).
Report is 82 commits behind head on develop.

Current head 059117e differs from pull request most recent head 49d7feb

Please upload reports for the commit 49d7feb to get more accurate results.

Files Patch % Lines
packages/oruga/src/components/table/Table.vue 0.00% 123 Missing and 40 partials ⚠️
packages/oruga/src/utils/helpers.ts 0.00% 8 Missing and 9 partials ⚠️
.../oruga/src/components/table/examples/draggable.vue 0.00% 8 Missing ⚠️
packages/oruga/src/composables/useObjectMap.ts 0.00% 5 Missing and 1 partial ⚠️
.../oruga/src/components/table/examples/checkable.vue 0.00% 3 Missing and 1 partial ⚠️
.../oruga/src/components/table/examples/customise.vue 0.00% 4 Missing ⚠️
...s/oruga/src/components/table/examples/detailed.vue 0.00% 4 Missing ⚠️
...ges/oruga/src/components/table/TableMobileSort.vue 0.00% 2 Missing and 1 partial ⚠️
.../oruga/src/components/table/examples/selection.vue 0.00% 3 Missing ⚠️
...oruga/src/components/table/examples/pagination.vue 0.00% 2 Missing ⚠️
... and 6 more
Additional details and impacted files
@@             Coverage Diff              @@
##           develop     #919       +/-   ##
============================================
- Coverage    56.71%   18.32%   -38.39%     
============================================
  Files           30      292      +262     
  Lines         1511     7333     +5822     
  Branches       544     2113     +1569     
============================================
+ Hits           857     1344      +487     
- Misses         654     5037     +4383     
- Partials         0      952      +952     
Flag Coverage Δ
oruga-next 18.32% <0.00%> (-38.39%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@mlmoravek mlmoravek added the breaking Breaking changes label May 1, 2024
@mlmoravek mlmoravek merged commit c85bee6 into oruga-ui:develop Jun 7, 2024
8 of 9 checks passed
@dauriata
Copy link
Contributor

dauriata commented Jun 7, 2024

@mlmoravek I just checked out your PR and for your information on the table example page it seems to me that seachable is not working and dragging throws a js error.

Also I looked at the code and I wonder why is it needed to compute an uuid, why not use the original data array row index as it seems to me that the original data array is never mutated ?

@mlmoravek
Copy link
Member Author

@dauriata Thanks for the review! You are right, there is a problem with the search function.
But dragging works as expected for me.

I will see if I can use the index instead of the uuid. At first I wrapped each row item completely and just emitted and worked with the wrapper item. But I changed it back. Maybe I can undo the uuid calculation too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking Breaking changes enhancement New feature or request
Projects
None yet
2 participants