Skip to content

Ajax data column, unable to bind events #7

@Iamzz-cn

Description

@Iamzz-cn

When I used the datatable, I set the ajax option in the given option, but I couldn't rebind the event to the button that was added to the ajax-postdatatable.

    firstColumns = [
        { title: 'name', data: 'name' },
        {
            title: 'operation',
            data: 'id',
            render: (data) => <Button text="delete" type={"danger"} className="on-click" />
        }
    ];
    options = {
        paging: true,
        lengthChange: false,
        searching: true,
        ordering: false,
        info: true,
        autoWidth: false,
        ajax:{
            'url':*********
        }
    };
<DataTable id={"user_list"}
                                       columns={this.firstColumns}
                                       options={this.options}
                                       onClickEvents={this.operationalEvent}
                                       footer hover striped responsive pageSize={2} />

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions