Skip to content

Fixing issue when cookie and filter control are enabled#8354

Open
djhvscf wants to merge 6 commits into
developfrom
issue-8246
Open

Fixing issue when cookie and filter control are enabled#8354
djhvscf wants to merge 6 commits into
developfrom
issue-8246

Conversation

@djhvscf

@djhvscf djhvscf commented May 22, 2026

Copy link
Copy Markdown
Collaborator

🤔Type of Request

  • Bug fix
  • New feature
  • Improvement
  • Documentation
  • Other

🔗Resolves an issue?

📝Changelog

  • Core
  • Extensions

💡Example(s)?
https://live.bootstrap-table.com/code/djhvscf/19231

☑️Self Check before Merge

⚠️ Please check all items below before reviewing. ⚠️

  • Doc is updated/provided or not needed
  • Demo is updated/provided or not needed
  • Changelog is provided or not needed

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes a filter-control + cookie interaction where the initial/deferred filter-control trigger could be treated as a user search and reset pagination state (e.g., pageNumber) after cookie restoration.

Changes:

  • Adds an isInitial flag path from triggerSearch() → jQuery event data → createControls handlers → onColumnSearch() to distinguish initial render vs user-initiated searches.
  • Updates initial filter-control triggering to call triggerSearch(true) on initial control creation.
  • Adds Vitest coverage (including regression guards + behavioral simulation) for the #8246 scenario.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
tests/extensions/filter-control.test.js Adds regression tests validating isInitial propagation and pagination behavior with cookies.
src/extensions/filter-control/utils.js Forwards isInitial from triggered events into onColumnSearch, and calls triggerSearch(true) after control creation.
src/extensions/filter-control/bootstrap-table-filter-control.js Extends triggerSearch and onColumnSearch to support isInitial and compute isInitialRender correctly.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/extensions/filter-control/bootstrap-table-filter-control.js
Comment thread tests/extensions/filter-control.test.js Outdated
@djhvscf djhvscf requested a review from wenzhixin May 25, 2026 17:30

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

Comment thread src/extensions/filter-control/utils.js Outdated
Comment thread tests/extensions/filter-control.test.js Outdated
djhvscf and others added 3 commits May 26, 2026 14:14
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants