title: useRef to create a cellEditor in ag-grid in React
body: <p>I have a questions on how to use the useRef Hook in React combined with the ag-grid component to create a persisent cellEditor. In the following <a href="https://github.com/ag-grid/ag-grid-react-example/blob/master/src-examples/simpleReduxHooksExample/PriceEditor.jsx" rel="nofollow noreferrer">Github</a> example, there is an example on how to access the new value after the user has edited the field in the ag-grid:</p>
  
  <pre><code>
  export default forwardRef((props, ref) =&gt; {
      const inputRef = useRef();
      useImperativeHandle(ref, () =&gt; {
          return {
              getValue: () =&gt; {
                  return inputRef.current.value;
              }
          };
      });
  
      useEffect(() =&gt; {
          // https://github.com/facebook/react/issues/7835#issuecomment-395504863
          setTimeout(() =&gt; inputRef.current.focus(), 10)
      }, []);
      return &lt;input type="text" ref={inputRef} defaultValue={props.value}/&gt;;
  })
  </code></pre>
  
  <p>What I don't understand is how I can find out which row and field i am editing. Could someone point me towards what I am missing?</p>