[Search] Fix crawlers page showing connectors after delete. (#180157)

## Summary

Crawlers page was showing connectors after a successful delete.

Fix Connectors Logic to include last "fetchConnectors" state, therefore
next time it is called without a change, it would bring correct results.

Before

87e06d3c-15e1-4b67-817f-49d800a9a6ae

After

bbe380f5-56b4-4da0-b5d7-ad95d5ab63d8


### Checklist

Delete any items that are not applicable to this PR.

- [ ] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [ ] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
This commit is contained in:
Efe Gürkan YALAMAN 2024-04-05 15:43:20 +02:00 committed by GitHub
parent 39230e3d3e
commit d14eb647e4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -191,6 +191,10 @@ export const ConnectorsLogic = kea<MakeLogicType<ConnectorsValues, ConnectorsAct
searchQuery,
size: meta.page.size,
}),
fetchConnectors: (state, payload) => ({
...state,
...payload,
}),
onPaginate: (state, { newPageIndex }) => ({
...state,
from: (newPageIndex - 1) * state.size,