mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-12-01 03:29:39 +08:00
fix: RowSelection fixed should work (#20735)
This commit is contained in:
parent
5c8cec5512
commit
4068f3d190
@ -11,7 +11,7 @@ exports[`Table.rowSelection fix selection column on the left 1`] = `
|
||||
class="ant-spin-container"
|
||||
>
|
||||
<div
|
||||
class="ant-table"
|
||||
class="ant-table ant-table-has-fix-left"
|
||||
>
|
||||
<div
|
||||
class="ant-table-container"
|
||||
@ -31,7 +31,8 @@ exports[`Table.rowSelection fix selection column on the left 1`] = `
|
||||
<thead>
|
||||
<tr>
|
||||
<th
|
||||
class="ant-table-cell ant-table-selection-column"
|
||||
class="ant-table-cell ant-table-selection-column ant-table-cell-fix-left ant-table-cell-fix-left-last"
|
||||
style="position:sticky;left:0"
|
||||
>
|
||||
<div
|
||||
class="ant-table-selection"
|
||||
@ -67,7 +68,8 @@ exports[`Table.rowSelection fix selection column on the left 1`] = `
|
||||
class="ant-table-row ant-table-row-level-0"
|
||||
>
|
||||
<td
|
||||
class="ant-table-cell ant-table-selection-column"
|
||||
class="ant-table-cell ant-table-selection-column ant-table-cell-fix-left ant-table-cell-fix-left-last"
|
||||
style="position:sticky;left:0"
|
||||
>
|
||||
<label
|
||||
class="ant-checkbox-wrapper"
|
||||
@ -95,7 +97,8 @@ exports[`Table.rowSelection fix selection column on the left 1`] = `
|
||||
class="ant-table-row ant-table-row-level-0"
|
||||
>
|
||||
<td
|
||||
class="ant-table-cell ant-table-selection-column"
|
||||
class="ant-table-cell ant-table-selection-column ant-table-cell-fix-left ant-table-cell-fix-left-last"
|
||||
style="position:sticky;left:0"
|
||||
>
|
||||
<label
|
||||
class="ant-checkbox-wrapper"
|
||||
@ -123,7 +126,8 @@ exports[`Table.rowSelection fix selection column on the left 1`] = `
|
||||
class="ant-table-row ant-table-row-level-0"
|
||||
>
|
||||
<td
|
||||
class="ant-table-cell ant-table-selection-column"
|
||||
class="ant-table-cell ant-table-selection-column ant-table-cell-fix-left ant-table-cell-fix-left-last"
|
||||
style="position:sticky;left:0"
|
||||
>
|
||||
<label
|
||||
class="ant-checkbox-wrapper"
|
||||
@ -151,7 +155,8 @@ exports[`Table.rowSelection fix selection column on the left 1`] = `
|
||||
class="ant-table-row ant-table-row-level-0"
|
||||
>
|
||||
<td
|
||||
class="ant-table-cell ant-table-selection-column"
|
||||
class="ant-table-cell ant-table-selection-column ant-table-cell-fix-left ant-table-cell-fix-left-last"
|
||||
style="position:sticky;left:0"
|
||||
>
|
||||
<label
|
||||
class="ant-checkbox-wrapper"
|
||||
|
@ -75,6 +75,7 @@ export default function useSelection<RecordType>(
|
||||
columnWidth: selectionColWidth = 60,
|
||||
type: selectionType,
|
||||
selections,
|
||||
fixed,
|
||||
} = rowSelection || {};
|
||||
|
||||
const { locale = defaultLocale } = React.useContext(ConfigContext);
|
||||
@ -416,11 +417,11 @@ export default function useSelection<RecordType>(
|
||||
const [expandColumn, ...restColumns] = columns;
|
||||
return [
|
||||
expandColumn,
|
||||
{ ...selectionColumn, fixed: getFixedType(restColumns[0]) },
|
||||
{ ...selectionColumn, fixed: fixed || getFixedType(restColumns[0]) },
|
||||
...restColumns,
|
||||
];
|
||||
}
|
||||
return [{ ...selectionColumn, fixed: getFixedType(columns[0]) }, ...columns];
|
||||
return [{ ...selectionColumn, fixed: fixed || getFixedType(columns[0]) }, ...columns];
|
||||
},
|
||||
[
|
||||
getRowKey,
|
||||
|
Loading…
Reference in New Issue
Block a user