Repository: element-plus/element-plus
File: packages/components/table/src/table-header/index.ts (TypeScript)

Code before:
        ref: 'theadRef',
        class: { [ns.is('group')]: isGroup },
      },
      columnRows.map((subColumns, rowIndex) =>
        h(
          'tr',
          {
            class: getHeaderRowClass(rowIndex),
            key: rowIndex,
            style: getHeaderRowStyle(rowIndex),
          },
          subColumns.map((column, cellIndex) => {
            if (column.rowSpan > rowSpan) {
              rowSpan = column.rowSpan
            }
            const _class = getHeaderCellClass(
              rowIndex,
              cellIndex,
              subColumns,
              column
            )
            if (isTableLayoutAuto) {
              if (column.fixed) {
                saveIndexSelection.set(_class, column)
              }
            }
            return h(
              'th',
              {
                class: _class,
                colspan: column.colSpan,
                key: `${column.id}-thead`,
                rowspan: column.rowSpan,
                style: getHeaderCellStyle(
                  rowIndex,
                  cellIndex,
                  subColumns,
                  column
                ),
                onClick: ($event) => {
                  if ($event.currentTarget.classList.contains('noclick')) {
                    return
                  }
                  handleHeaderClick($event, column)
                },
                onContextmenu: ($event) =>
                  handleHeaderContextMenu($event, column),
                onMousedown: ($event) => handleMouseDown($event, column),
                onMousemove: ($event) => handleMouseMove($event, column),
                onMouseout: handleMouseOut,
              },

Review comment (suggestion):
```suggestion
            if (isTableLayoutAuto && column.fixed) {
              saveIndexSelection.set(_class, column)
            }
```


Code after:
        class: { [ns.is('group')]: isGroup },
      },
      columnRows.map((subColumns, rowIndex) =>
        h(
          'tr',
          {
            class: getHeaderRowClass(rowIndex),
            key: rowIndex,
            style: getHeaderRowStyle(rowIndex),
          },
          subColumns.map((column, cellIndex) => {
            if (column.rowSpan > rowSpan) {
              rowSpan = column.rowSpan
            }
            const _class = getHeaderCellClass(
              rowIndex,
              cellIndex,
              subColumns,
              column
            )
            if (isTableLayoutAuto && column.fixed) {
              saveIndexSelection.set(_class, column)
            }
            return h(
              'th',
              {
                class: _class,
                colspan: column.colSpan,
                key: `${column.id}-thead`,
                rowspan: column.rowSpan,
                style: getHeaderCellStyle(
                  rowIndex,
                  cellIndex,
                  subColumns,
                  column
                ),
                onClick: ($event) => {
                  if ($event.currentTarget.classList.contains('noclick')) {
                    return
                  }
                  handleHeaderClick($event, column)
                },
                onContextmenu: ($event) =>
                  handleHeaderContextMenu($event, column),
                onMousedown: ($event) => handleMouseDown($event, column),
                onMousemove: ($event) => handleMouseMove($event, column),
                onMouseout: handleMouseOut,
              },
              [
                h(
                  'div',