title: ag-Grid/Reactjs - How to get cell value in columnDefs
body: <p>I am using ag-Grid table in a Reactjs app, a snippet of my code can be seen below:</p>
  
  <pre><code>const columnsDef = [
    .
    .
    {
      headerName: 'Side',
      field: UI_FIELDS.SIDE,
      width: 70,
      cellRenderer: sideRenderer,
      cellRendererParams: {
        value: "BUY"
      }
    },
    .
    .
  ]
  
  function sideRenderer(params) {
    const value = _.get(params, 'value') || '';
    const styleSuffix = _.isEmpty(value) ? 'default' : value.toLowerCase();
  
    return `&lt;span class="side-renderer side-renderer-${styleSuffix}"&gt;${value}&lt;/span&gt;`;
  }
  </code></pre>
  
  <p>I have hardcoded <code>value: "BUY"</code> in my <code>cellRendererParams</code> for the moment, but I want this to actually be equal to whatever is in that cell for that column, which could be either <code>BUY</code> or <code>SELL</code>. </p>
  
  <p>This value affects what css is applied to the text, a <code>BUY</code> value will be coloured Green and a <code>Sell</code> value will be colour Red. </p>
  
  <p>How do I set <code>value</code> to be equal to the actual text in the cell and not be hard coded like this?</p>