private renderCellContentRadios()

in src/draft-components/gridv2/grid.tsx [590:612]


  private renderCellContentRadios(content: string, colIndex: number, rowIndex: number) {
    const isActiveCell = this.activeCell.join('-') === `${colIndex}-${rowIndex}`;
    const radios = content.split(', ');
    const name = `radio-${colIndex}-${rowIndex}`;
    radios.shift();

    return radios.map((radio) => (
      <label
        class="test-actions grid-radio"
        id={`action-${rowIndex}-${colIndex}`}
      >
        <input
          type="radio"
          name={name}
          ref={isActiveCell && this.isEditing ? (el) => { this.focusRef = el; } : null}
          tabIndex={this.gridType === 'grid' ? isActiveCell && (this.isEditing || !this.modalCell) ? 0 : -1 : null}
          onKeyDown={(event) => { (event.key === 'ArrowUp' || event.key === 'ArrowDown' || event.key === 'ArrowLeft' || event.key === 'ArrowRight') && event.stopPropagation(); }}
          onFocus={() => { this.onCellFocus(rowIndex, colIndex)}}
          />
        {radio}
      </label>
    ));
  }