Skip to content

How to wrap checkbox in addition div and label and make it clickable? #961

@cdevent

Description

@cdevent

Hi, I need to customize checkbox and I can't normally wrap it,

I've added additional wrapping elements - then when I'm clicking on this it's not selecting a row, working only clicking on a row.

Here is' fragment:

            <td onClick={ this.handleClick } { ...attrs }>
              {
                selectionRenderer ? selectionRenderer({
                  mode: inputType,
                  checked: selected,
                  disabled,
                  rowIndex
                }) : (
                  <div className="checkbox">
                  <label className="label">
                  <input
                    type={ inputType }
                    checked={ selected }
                    disabled={ disabled }
                    className={ bootstrap4 ? 'selection-input-4' : '' }
                    onChange={ () => {} }
                  />
                  <span className="cr"><i className="cr-icon"></i></span>
                  </label>
                  </div>
                )
              }
            </td>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions