How to use the react-data-grid.shapes.Column function in react-data-grid

To help you get started, we’ve selected a few react-data-grid examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github adazzle / react-data-grid / packages / react-data-grid-addons / src / editors / AutoCompleteEditor.js View on Github external
import '../../../../themes/ron-react-autocomplete.css';

const optionPropType = PropTypes.shape({
  id: PropTypes.required,
  title: PropTypes.string
});

export default class AutoCompleteEditor extends React.Component {
  static propTypes = {
    onCommit: PropTypes.func,
    options: PropTypes.arrayOf(optionPropType),
    label: PropTypes.any,
    value: PropTypes.any,
    height: PropTypes.number,
    valueParams: PropTypes.arrayOf(PropTypes.string),
    column: PropTypes.shape(shapes.Column),
    resultIdentifier: PropTypes.string,
    search: PropTypes.string,
    onKeyDown: PropTypes.func,
    onFocus: PropTypes.func,
    editorDisplayValue: PropTypes.func
  };

  static defaultProps = {
    resultIdentifier: 'id'
  };

  handleChange = () => {
    this.props.onCommit();
  };

  getValue = () => {
github adazzle / react-data-grid / packages / react-data-grid-addons / src / cells / headerCells / filters / NumericFilter.js View on Github external
return (
      <div>
        <div style="{columnStyle}">
          <input placeholder="e.g. 3,10-15,>20" type="text">
        </div>
        <div>
          <span title="{tooltipText}" style="{badgeStyle}">?</span>
        </div>
      </div>
    );
  }
}

NumericFilter.propTypes = {
  onChange: PropTypes.func.isRequired,
  column: PropTypes.shape(shapes.Column)
};