mirror of
https://github.com/invoke-ai/InvokeAI.git
synced 2026-02-12 13:25:22 -05:00
fix(ui): hide ref panel when last one is deleted
This commit is contained in:
@@ -193,6 +193,9 @@ export const refImagesSlice = createSlice({
|
||||
const nextIndex = clamp(currentIndex, 0, state.entities.length - 1);
|
||||
const nextEntity = state.entities[nextIndex];
|
||||
state.selectedEntityId = nextEntity?.id ?? null;
|
||||
if (state.selectedEntityId === null) {
|
||||
state.isPanelOpen = false;
|
||||
}
|
||||
},
|
||||
refImageSelected: (state, action: PayloadAction<{ id: string }>) => {
|
||||
const { id } = action.payload;
|
||||
|
||||
Reference in New Issue
Block a user