Fixes issue with removing first workpad page (#110495)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
parent
835e88986c
commit
edc147b6f4
|
@ -123,7 +123,7 @@ export const pagesReducer = handleActions(
|
||||||
newState = addPage(newState);
|
newState = addPage(newState);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (wasOnlyPage) {
|
if (wasOnlyPage || curIndex === 0) {
|
||||||
newState = set(newState, 'page', 0);
|
newState = set(newState, 'page', 0);
|
||||||
gotoPage(1);
|
gotoPage(1);
|
||||||
} else if (wasSelected || delIndex < curIndex) {
|
} else if (wasSelected || delIndex < curIndex) {
|
||||||
|
|
Loading…
Reference in a new issue