mirror of
https://github.com/ostris/ai-toolkit.git
synced 2026-04-20 22:39:03 +00:00
Fixed some bugs with ui and lock job name to prevent issues with continuing training.
This commit is contained in:
@@ -77,6 +77,10 @@ export function useNestedState<T>(initialState: T): [T, (value: any, path?: stri
|
||||
const [state, setState] = React.useState<T>(initialState);
|
||||
|
||||
const setValue = React.useCallback((value: any, path?: string) => {
|
||||
if (path === undefined) {
|
||||
setState(value);
|
||||
return
|
||||
}
|
||||
setState(prevState => setNestedValue(prevState, value, path));
|
||||
}, []);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user