Skip to content

DetailsList Fluent UI #28103

Discussion options

You must be logged in to vote

Looks like you need to use onRenderCheckbox prop.
Here's the example:

const onRenderCheck = ({ isSelected }: { isSelected: boolean }) => {
    return (
      <span
        key="check"
        role="checkbox"
        aria-label={'some-aria-label'}
        data-selection-toggle={true}
        aria-checked={isSelected}
      >
        <input type="checkbox" />
      </span>
    );
  };

And then use it in the DataList:

<DetailsList
          onRenderCheckbox={onRenderCheck}
            compact={true}
            items={items}
            columns={this._columns}
            setKey="set"
            layoutMode={DetailsListLayoutMode.justified}
            selection={this._selection}
            s…

Replies: 4 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@spmonahan
Comment options

Answer selected by ValentinaKozlova
Comment options

You must be logged in to vote
1 reply
@smhigley
Comment options

Comment options

You must be logged in to vote
1 reply
@pns09
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment