mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-12-05 05:50:04 +08:00
fix(react): avoid redundant DNS and proxy updates (#8543)
This commit is contained in:
@@ -586,20 +586,10 @@ export function DnsViewer({ ref }: { ref?: Ref<DialogRef> }) {
|
||||
? event.target.checked
|
||||
: event.target.value
|
||||
|
||||
setValues((prev) => {
|
||||
const newValues = {
|
||||
...prev,
|
||||
[field]: value,
|
||||
}
|
||||
|
||||
if (visualization) {
|
||||
setTimeout(() => {
|
||||
updateYamlFromValues()
|
||||
}, 0)
|
||||
}
|
||||
|
||||
return newValues
|
||||
})
|
||||
setValues((prev) => ({
|
||||
...prev,
|
||||
[field]: value,
|
||||
}))
|
||||
}
|
||||
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user