diff options
-rw-r--r-- | frontend/src/Settings/Providers/components.tsx | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/frontend/src/Settings/Providers/components.tsx b/frontend/src/Settings/Providers/components.tsx index c30742504..9e005d123 100644 --- a/frontend/src/Settings/Providers/components.tsx +++ b/frontend/src/Settings/Providers/components.tsx @@ -2,6 +2,7 @@ import { capitalize, isArray, isBoolean } from "lodash"; import React, { FunctionComponent, useCallback, + useEffect, useMemo, useState, } from "react"; @@ -81,6 +82,10 @@ export const ProviderModal: FunctionComponent = () => { const [staged, setChange] = useState<LooseObject>({}); + useEffect(() => { + setInfo(payload); + }, [payload]); + const [info, setInfo] = useState<Nullable<ProviderInfo>>(payload); useOnModalShow<ProviderInfo>((p) => setInfo(p), ModalKey); |