How to use the react-data-grid.editors.SimpleTextEditor 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 geosolutions-it / MapStore2 / web / client / components / data / featuregrid / editors / AttributeEditor.jsx View on Github external
const PropTypes = require('prop-types');
const { editors } = require('react-data-grid');

class AttributeEditor extends editors.SimpleTextEditor {
    static propTypes = {
        onTemporaryChanges: PropTypes.func
    };
    static defaultProps = {
        onTemporaryChanges: () => {}
    };
    componentDidMount() {
        if (this.props.onTemporaryChanges) {
            this.props.onTemporaryChanges(true);
        }
    }
    componentWillUnmount() {
        // needs to be detouched.
        // Otherwise this will trigger before other events out of the editors
        // and so the tempChanges seems to be not present.
        if (this.props.onTemporaryChanges) {