Frun1na opened a new pull request, #4595:
URL: https://github.com/apache/rocketmq-dashboard/pull/4595
### Which Issue(s) This PR Fixes
### Brief Description
#4240 already resets the table column filters when the selected NameServer
changes, but the text search and the type filter still carried over: after
switching, the input kept the old term and the request kept `type: 'Consumer'`,
so the new endpoint's connections could all be hidden by the previous
endpoint's filters.
`handleNameserverChange` now also clears the search text and the type
filter, alongside the cluster filter and page reset that already happen there.
### How Did You Test This Change?
New regression test `clears the text search and type filter when the
nameserver changes` (fails on master, passes with this PR):
```
$ cd web && npx vitest run src/pages/cluster/__tests__/ClientsPage.test.tsx
src/pages/cluster/__tests__/clientsSearch.test.ts
Test Files 2 passed (2)
Tests 26 passed (26)
```
```
$ cd web && npm run lint
✖ 10 problems (0 errors, 10 warnings)
```
All 10 lint warnings are pre-existing and in files this PR does not touch.
### Checklist
- [x] One coherent change; unrelated modifications are not bundled in
- [x] Commit subject follows Conventional Commits (`feat:` / `fix:` /
`refactor:` / `chore:` / `docs:` / `perf:`)
- [x] Tests added or updated for non-trivial changes, test methods named
`...Test`
- [x] New UI text has both Chinese and English entries under `web/src/i18n/`
(no new UI text in this PR)
- [x] Architecture constraints stay green (`mvn test` runs the ArchUnit
checks) (frontend-only change)
- [x] New source files carry the ASF license header (no new source files)
- [x] Documentation touched where behaviour changed (README / `docs/` /
in-app help) (no behaviour that docs cover)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]