unbridled-41 opened a new issue, #4238:
URL: https://github.com/apache/rocketmq-dashboard/issues/4238
## Problem
On the Client Connections page, switching the NameServer endpoint keeps the
previous endpoint's table column filters active. The columns use uncontrolled
antd filters (`filters` + `onFilter` with no `filteredValue`), and
`handleNameserverChange` resets `connections`, `clusterFilter`, and the
selected row — but neither the `columnFilters` export mirror nor antd's
internal filter state.
## Evidence
- `web/src/pages/cluster/clients.tsx` `handleNameserverChange` resets
`currentPage`, `selectedEndpoint`, `connections`, `clusterFilter`,
`selectedConnection`, `loadError`, `loading` — but not `columnFilters` (state
declared as `useState<ClientTableFilters>({})`).
- The clusterName / type / protocol / language columns declare `filters` +
`onFilter` without a controlled `filteredValue`, so antd keeps its internal
filter selection across `dataSource` changes.
- `columnFilters` is only written by the table `onChange` handler and
consumed by `exportConnections`, which drives both the export CSV and the
Export button's disabled state.
Reproduction: on NameServer A, filter the type column to `Consumer` (or pick
a cluster name), then switch the NameServer select to endpoint B whose rows
have different cluster names/types. After the new load finishes, the table
shows no rows and the stats header reports 0 connections, while the new
endpoint's data was fetched; the Export button stays disabled.
## Impact
An operator switching between NameServer endpoints silently sees an empty
client list and cannot export, because filters scoped to the previous endpoint
are still applied to the new rows. The state must be manually discovered and
cleared to see the real data.
## Expected behavior
Endpoint-scoped column filters are cleared when the NameServer changes: the
new endpoint's rows render immediately and the export matches the unfiltered
(search + cluster-select) view.
## Related work
- #3291 (closed) covered the backend ignoring cluster/type filters — a
different defect on the same page.
- The registry/preview/diff guards on the cluster pages (#3151, merged
#3154) follow the same "invalidate per-scope state when the scope changes"
principle.
## PR
Fix incoming.
--
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]