mirror of
https://github.com/Equicord/Equicord.git
synced 2025-06-17 02:17:03 -04:00
parent
eca4af829f
commit
ebe10d3fad
2 changed files with 40 additions and 57 deletions
|
@ -33,11 +33,10 @@ export function SettingTextComponent({ option, pluginSettings, definedSettings,
|
|||
const isValid = option.isValid?.call(definedSettings, newValue) ?? true;
|
||||
if (typeof isValid === "string") setError(isValid);
|
||||
else if (!isValid) setError("Invalid input provided.");
|
||||
else {
|
||||
setError(null);
|
||||
setState(newValue);
|
||||
onChange(newValue);
|
||||
}
|
||||
else setError(null);
|
||||
|
||||
setState(newValue);
|
||||
onChange(newValue);
|
||||
}
|
||||
|
||||
return (
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue