material-table icon indicating copy to clipboard operation
material-table copied to clipboard

The "onChange" event of a custom column does not fire when using IE 11

Open DaniloSI opened this issue 6 years ago • 1 comments

Hello, I have the following problem:

In my table, one of the columns is Checkboxes. However, the "onChange" event does not fire when using the IE 11 browser.

Below is the code snippet:

columns={[
    { title: 'Nome', field: 'nome' },
    { title: 'E-mail', field: 'email' },
    { title: 'Telefone', field: 'telefone' },
    { title: 'Empresa', field: 'empresa' },
    {
        title: 'Presente',
        field: 'presente',
        render: rowData => (
            <Checkbox
                name="presente"
                checked={rowData.presente.isTrue()}
                onChange={e => {
                    // The code bellow is not executed in IE Browser
                    const newParticipantes = [...participantes];
                    newParticipantes[participantes.indexOf(rowData)] = {
                        ...rowData,
                        presente: e.target.checked
                    };
                    setParticipantes([...newParticipantes]);
                }}
                color="primary"
            />
        )
    },
]}

DaniloSI avatar Apr 24 '20 16:04 DaniloSI

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. You can reopen it if it required.

stale[bot] avatar Jul 23 '20 17:07 stale[bot]