Skip to content

feat(table): keep checked on page change#1548

Merged
mlmoravek merged 18 commits intooruga-ui:developfrom
whiplashwebb:feature/keep-checked
Mar 5, 2026
Merged

feat(table): keep checked on page change#1548
mlmoravek merged 18 commits intooruga-ui:developfrom
whiplashwebb:feature/keep-checked

Conversation

@whiplashwebb
Copy link
Contributor

Screen.Recording.2026-02-18.at.12.51.23.PM.mov

In Oruga's current checked table implementation, checkedRows clears when the user navigates to a new page. This works well for some use-cases, but sometimes you need to persist your selected rows. This PR adds a new keep-checked-on-page-change prop so you as a developer can control this behavior. The default remains the same and existing implementations will be unaffected by this change. There is also a new config option to control the default globally.

Proposed Changes

  • Adds new keep-checked-on-page-change prop
  • Adds related types and documentation

@netlify
Copy link

netlify bot commented Feb 18, 2026

Deploy Preview for oruga-documentation-preview ready!

Name Link
🔨 Latest commit f30fc82
🔍 Latest deploy log https://app.netlify.com/projects/oruga-documentation-preview/deploys/69a853c445f9ce00082476f9
😎 Deploy Preview https://deploy-preview-1548--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 project configuration.

@whiplashwebb whiplashwebb changed the title feat(table): Keep Checked On Page Change feat(table): keep checked on page change Feb 18, 2026
@mlmoravek
Copy link
Member

Hmm, I see what you want. This behaviour was implemented in #1368 in relation to #1366.
However, I was probably a little too exuberant. It might be better to remove the tableCurrentPage from the watcher.

I'll think about the best solution.

@mlmoravek
Copy link
Member

Thanks also for the recording. I found another bug in it: The second page of your modified example should only show two items, not five! :D

@whiplashwebb
Copy link
Contributor Author

@mlmoravek I think it's actually better to have a prop/default based toggle for this. I think both use-cases are valid depending on what you're doing. Even on the page I'm building I could see a strong argument for forcing the user to go page by page since the user can't see what's on previous pages. So I think it's good to offer choice rather than choosing one correct path for all implementations.

# Conflicts:
#	packages/oruga/src/components/table/examples/checkable.vue
# Conflicts:
#	packages/docs/components/Table.md
@whiplashwebb
Copy link
Contributor Author

@mlmoravek i addressed all your feedback, have another look when you get a sec

@mlmoravek mlmoravek added enhancement Improvements to existing features and functionality feature A new feature and removed enhancement Improvements to existing features and functionality labels Mar 4, 2026
@mlmoravek mlmoravek merged commit f9587a9 into oruga-ui:develop Mar 5, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature A new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants