Skip to content

Commit

Permalink
fix: redundant calls to handleRowsChange (#1349)
Browse files Browse the repository at this point in the history
  • Loading branch information
kswenson authored Jul 13, 2024
1 parent fc266e3 commit 4aa6229
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions v3/src/components/case-table/color-cell-text-editor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -91,19 +91,13 @@ export default function ColorCellTextEditor({ row, column, onRowChange, onClose
updateValue(event.target.value)
}

function handleInputKeyDown(event: React.KeyboardEvent) {
if (event.key === "Enter") acceptValue()
if (event.key === "Escape") rejectValue()
}

function handleInputBlur() {
!isPaletteOpen && acceptValue()
}

const swatchStyle: React.CSSProperties | undefined = showColorSwatch.current ? { background: color } : undefined
const inputElt = <InputElt
value={inputValue}
onKeyDown={handleInputKeyDown}
onChange={handleInputColorChange}
onBlur={handleInputBlur}
/>
Expand Down

0 comments on commit 4aa6229

Please sign in to comment.