Skip to content

Conversation

gimmyhehe
Copy link
Member

@gimmyhehe gimmyhehe commented Sep 12, 2025

PR

修复filterStore.searchValue 无法响应式的问题

PR Checklist

Please check if your PR fulfills the following requirements:

  • The commit message follows our Commit Message Guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • Other... Please describe:

What is the current behavior?

Issue Number: N/A

What is the new behavior?

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

Summary by CodeRabbit

  • Chores
    • Improved table filter state management to capture a search term internally, laying groundwork for more flexible filtering.
    • No changes to visible behavior or public APIs; existing table and filter functionality remains unchanged for end-users.

Copy link

coderabbitai bot commented Sep 12, 2025

Walkthrough

Added a new reactive property searchValue: '' to the filterStore initialization in the Vue table module without changing public APIs or other logic.

Changes

Cohort / File(s) Summary
Vue Table Filter State
packages/vue/src/grid/src/table/src/table.ts
Initialize filterStore with a new field searchValue: '' alongside existing visible: false; no changes to exported signatures or other logic.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Pre-merge checks (3 passed)

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The title directly and concisely summarizes the primary change — making filterStore.searchValue reactive — and accurately reflects the PR's modifications and objectives, so it meets the relevance and clarity criteria.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.

Poem

A carrot of code, a nibble so slight,
I tucked in searchValue, tidy and light.
Filters can whisper, “find what you seek,”
In grids that shuffle, row by row, sleek.
Thump-thump—tests pass, moonlit delight!

Tip

👮 Agentic pre-merge checks are now available in preview!

Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.

  • Built-in checks – Quickly apply ready-made checks to enforce title conventions, require pull request descriptions that follow templates, validate linked issues for compliance, and more.
  • Custom agentic checks – Define your own rules using CodeRabbit’s advanced agentic capabilities to enforce organization-specific policies and workflows. For example, you can instruct CodeRabbit’s agent to verify that API documentation is updated whenever API schema files are modified in a PR. Note: Upto 5 custom checks are currently allowed during the preview period. Pricing for this feature will be announced in a few weeks.

Please see the documentation for more information.

Example:

reviews:
  pre_merge_checks:
    custom_checks:
      - name: "Undocumented Breaking Changes"
        mode: "warning"
        instructions: |
          Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).

Please share your feedback with us on this Discord post.


📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 7284629 and 69c64cf.

📒 Files selected for processing (1)
  • packages/vue/src/grid/src/table/src/table.ts (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: PR E2E Test (pnpm test:e2e3)
🔇 Additional comments (2)
packages/vue/src/grid/src/table/src/table.ts (2)

363-365: Solid fix: predeclaring searchValue ensures Vue 2/3 reactivity.

Adding searchValue: '' to filterStore prevents non-reactive late additions. No behavioral regressions visible.


363-365: Align typings and usage; consider reset semantics.

  • If a FilterStore type/interface exists, add searchValue: string to prevent typing drift/TS errors — file: packages/vue/src/grid/src/table/src/table.ts (lines 363–365).
  • Ensure GridFilter reads filterStore.searchValue (option search) distinctly from condition.input.
  • Optional: clear filterStore.searchValue when the filter panel closes to avoid stale term carryover.

Verification blocked: rg returned "unrecognized file type: vue" so usages/types couldn't be located. Re-run searches without --type=vue or add --type-add 'vue:*.vue' and attach results.

✨ Finishing touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch cgm/fix-filter-search-value

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions bot added the bug Something isn't working label Sep 12, 2025
@zzcr zzcr merged commit 11f8b7b into dev Sep 18, 2025
10 of 11 checks passed
@zzcr zzcr deleted the cgm/fix-filter-search-value branch September 18, 2025 06:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants