Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix CCR search bug caused by paused follower indices #64717

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,11 @@ export class FollowerIndicesTable extends PureComponent {

if (queryText) {
return followerIndices.filter(followerIndex => {
const { name, shards } = followerIndex;
const { name, remoteCluster, leaderIndex } = followerIndex;

const inName = name.toLowerCase().includes(queryText);
const inRemoteCluster = shards[0].remoteCluster.toLowerCase().includes(queryText);
const inLeaderIndex = shards[0].leaderIndex.toLowerCase().includes(queryText);
const inRemoteCluster = remoteCluster.toLowerCase().includes(queryText);
const inLeaderIndex = leaderIndex.toLowerCase().includes(queryText);

return inName || inRemoteCluster || inLeaderIndex;
});
Expand Down Expand Up @@ -273,7 +273,7 @@ export class FollowerIndicesTable extends PureComponent {
};

const selection = {
onSelectionChange: selectedItems => this.setState({ selectedItems }),
onSelectionChange: newSelectedItems => this.setState({ selectedItems: newSelectedItems }),
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I had to make this change to satisfy the linter.

};

const search = {
Expand Down