Skip to content

Commit df18fe0

Browse files
Mary Hippmaryhipp
authored andcommitted
make sure that recent view always sorts by opened_at even if not available as sort option in UI
1 parent e5591d1 commit df18fe0

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

invokeai/frontend/web/src/features/nodes/store/workflowLibrarySlice.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@ export const workflowLibrarySlice = createSlice({
3939
workflowLibraryViewChanged: (state, action: PayloadAction<WorkflowLibraryState['view']>) => {
4040
state.view = action.payload;
4141
state.searchTerm = '';
42+
if (action.payload === 'recent') {
43+
state.orderBy = 'opened_at';
44+
state.direction = 'DESC';
45+
}
4246
},
4347
workflowLibraryTagToggled: (state, action: PayloadAction<string>) => {
4448
const tag = action.payload;

0 commit comments

Comments
 (0)