mirror of
https://github.com/idanoo/autobrr
synced 2025-07-23 16:59:12 +00:00
fix(indexers-irc): load new values on update (#274)
* fix(indexers-irc): reload config on restart * fix(indexers-irc): reload config * fix: indexer add form
This commit is contained in:
parent
45053d9823
commit
2903e7b493
6 changed files with 46 additions and 55 deletions
|
@ -370,15 +370,18 @@ export function IndexerAddForm({ isOpen, toggle }: AddProps) {
|
|||
})}
|
||||
value={field?.value && field.value.value}
|
||||
onChange={(option: unknown) => {
|
||||
const opt = option as SelectValue;
|
||||
resetForm();
|
||||
|
||||
const opt = option as SelectValue;
|
||||
setFieldValue("name", opt.label ?? "");
|
||||
setFieldValue(field.name, opt.value ?? "");
|
||||
|
||||
const ind = data && data.find(i => i.identifier === opt.value);
|
||||
if (ind) {
|
||||
setIndexer(ind);
|
||||
if (ind.irc.settings) {
|
||||
setFieldValue("implementation", ind.implementation);
|
||||
|
||||
if (ind.irc && ind.irc.settings) {
|
||||
ind.irc.settings.forEach((s) => {
|
||||
setFieldValue(`irc.${s.name}`, s.default ?? "");
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue