Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

177
Views
How to determine from an ag-grid cell editof whether is opened by tab navigation or not?

Currently this is works perfectly when the cell editor is opened by enter (I can see 13 in the keyPress prop, but it's null when its opened by tab navigation)

   export const CellEditor = forwardRef((props, ref) => {
const { value, api: gridApi, keyPress, column } = props
const isOpenedByEnter = 13 === keyPress
  // the above is null when the cell editor is opened by tab navigation, and no field for moude events
const checkboxRef = useRef()
const initialValue = isEmptyValue(value) ? undefined : value
const [checkboxValue, setCheckboxValue] = useState(initialValue)

useImperativeHandle(ref, () => {
  return {
    getValue: () => {
      return checkboxValue
    },

    isPopup() {
      return false
    },

    afterGuiAttached: () => {
      isOpenedByEnter && toggleCheckbox()
    },
  }
})

const toggleCheckbox = () => {
  setCheckboxValue((prevCheck) => !prevCheck)
}


const handleOnChange = (clickEvent) => {
  setCheckboxValue(clickEvent.target.checked)
}

return (
  <div>
    <input type="checkbox" ref={checkboxRef} checked={!!checkboxValue} onChange={handleOnChange} />
  </div>
)})
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!