refactor: rename channel priority update to channel field update

This commit is contained in:
CaIon
2026-07-25 16:59:05 +08:00
parent a0d0e5049e
commit 18b0b7631a
5 changed files with 92 additions and 82 deletions
@@ -122,8 +122,10 @@ export function NumericSpinnerInput({
const handleKeyDown = (e: React.KeyboardEvent) => {
if (e.key === 'Enter') {
e.preventDefault()
commitValue()
onCommit?.()
// Blurring routes Enter through the same focusout path as clicking
// away (input onBlur -> commitValue, container onBlur -> onCommit),
// so commit and onCommit each fire exactly once.
inputRef.current?.blur()
} else if (e.key === 'Escape') {
setEditing(false)
setLocalValue(String(value ?? 0))