Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #4430: Row editor icon overrides #4433

Merged
merged 1 commit into from
May 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 32 additions & 29 deletions components/lib/datatable/BodyRow.js
Original file line number Diff line number Diff line change
Expand Up @@ -304,45 +304,48 @@ export const BodyRow = React.memo((props) => {
return (
<BodyCell
key={key}
value={props.value}
tableProps={props.tableProps}
tableSelector={props.tableSelector}
allowCellSelection={props.allowCellSelection}
cellClassName={props.cellClassName}
checkIcon={props.checkIcon}
collapsedRowIcon={props.collapsedRowIcon}
column={col}
rowData={props.rowData}
rowIndex={props.rowIndex}
index={i}
rowSpan={rowSpan}
compareSelectionBy={props.compareSelectionBy}
dataKey={props.dataKey}
editMode={props.editMode}
editing={editing}
editingMeta={props.editingMeta}
editMode={props.editMode}
expanded={props.expanded}
expandedRowIcon={props.expandedRowIcon}
frozenRow={props.frozenRow}
index={i}
isSelectable={props.isSelectable}
onCheckboxChange={props.onCheckboxChange}
onClick={props.onCellClick}
onEditingMetaChange={props.onEditingMetaChange}
onMouseDown={props.onCellMouseDown}
onMouseUp={props.onCellMouseUp}
onRadioChange={props.onRadioChange}
onRowEditCancel={onEditCancel}
onRowEditInit={onEditInit}
onRowEditSave={onEditSave}
onRowEditCancel={onEditCancel}
onEditingMetaChange={props.onEditingMetaChange}
onRowToggle={props.onRowToggle}
selection={props.selection}
selectionAriaLabel={props.tableProps.selectionAriaLabel}
allowCellSelection={props.allowCellSelection}
compareSelectionBy={props.compareSelectionBy}
responsiveLayout={props.responsiveLayout}
rowData={props.rowData}
rowEditorCancelIcon={props.rowEditorCancelIcon}
rowEditorInitIcon={props.rowEditorInitIcon}
rowEditorSaveIcon={props.rowEditorSaveIcon}
rowIndex={props.rowIndex}
rowSpan={rowSpan}
selectOnEdit={props.selectOnEdit}
selected={props.selected}
onClick={props.onCellClick}
onMouseDown={props.onCellMouseDown}
onMouseUp={props.onCellMouseUp}
tabIndex={props.tabIndex}
cellClassName={props.cellClassName}
responsiveLayout={props.responsiveLayout}
frozenRow={props.frozenRow}
isSelectable={props.isSelectable}
showSelectionElement={props.showSelectionElement}
selection={props.selection}
selectionAriaLabel={props.tableProps.selectionAriaLabel}
showRowReorderElement={props.showRowReorderElement}
onRadioChange={props.onRadioChange}
onCheckboxChange={props.onCheckboxChange}
expanded={props.expanded}
expandedRowIcon={props.expandedRowIcon}
collapsedRowIcon={props.collapsedRowIcon}
checkIcon={props.checkIcon}
showSelectionElement={props.showSelectionElement}
tabIndex={props.tabIndex}
tableProps={props.tableProps}
tableSelector={props.tableSelector}
value={props.value}
virtualScrollerOptions={props.virtualScrollerOptions}
/>
);
Expand Down
105 changes: 54 additions & 51 deletions components/lib/datatable/DataTable.js
Original file line number Diff line number Diff line change
Expand Up @@ -1486,75 +1486,78 @@ export const DataTable = React.forwardRef((inProps, ref) => {
const frozenBody = ObjectUtils.isNotEmpty(props.frozenValue) && (
<TableBody
ref={frozenBodyRef}
value={props.frozenValue}
cellClassName={props.cellClassName}
cellSelection={props.cellSelection}
checkIcon={props.checkIcon}
className="p-datatable-tbody p-datatable-frozen-tbody"
frozenRow
tableProps={props}
tableSelector={attributeSelector.current}
collapsedRowIcon={props.collapsedRowIcon}
columns={columns}
selectionModeInColumn={selectionModeInColumn}
first={first}
compareSelectionBy={props.compareSelectionBy}
contextMenuSelection={props.contextMenuSelection}
dataKey={props.dataKey}
dragSelection={props.dragSelection}
editMode={props.editMode}
editingMeta={editingMetaState}
onEditingMetaChange={onEditingMetaChange}
tabIndex={props.tabIndex}
onRowClick={props.onRowClick}
onRowDoubleClick={props.onRowDoubleClick}
onRowMouseEnter={props.onRowMouseEnter}
onRowMouseLeave={props.onRowMouseLeave}
onCellClick={props.onCellClick}
selection={props.selection}
onSelectionChange={props.onSelectionChange}
editingRows={props.editingRows}
emptyMessage={props.emptyMessage}
expandableRowGroups={props.expandableRowGroups}
expandedRowIcon={props.expandedRowIcon}
expandedRows={props.expandedRows}
first={first}
frozenRow
groupRowsBy={props.groupRowsBy}
isDataSelectable={props.isDataSelectable}
isVirtualScrollerDisabled={true}
lazy={props.lazy}
paginator={props.paginator}
loading={props.loading}
metaKeySelection={props.metaKeySelection}
onCellClick={props.onCellClick}
onCellSelect={props.onCellSelect}
onCellUnselect={props.onCellUnselect}
onRowSelect={props.onRowSelect}
onRowUnselect={props.onRowUnselect}
dragSelection={props.dragSelection}
onContextMenu={props.onContextMenu}
onContextMenuSelectionChange={props.onContextMenuSelectionChange}
metaKeySelection={props.metaKeySelection}
selectionMode={props.selectionMode}
cellSelection={props.cellSelection}
contextMenuSelection={props.contextMenuSelection}
dataKey={props.dataKey}
expandedRows={props.expandedRows}
onEditingMetaChange={onEditingMetaChange}
onRowClick={props.onRowClick}
onRowCollapse={props.onRowCollapse}
onRowDoubleClick={props.onRowDoubleClick}
onRowEditCancel={props.onRowEditCancel}
onRowEditChange={props.onRowEditChange}
onRowEditComplete={props.onRowEditComplete}
onRowEditInit={props.onRowEditInit}
onRowEditSave={props.onRowEditSave}
onRowExpand={props.onRowExpand}
onRowToggle={props.onRowToggle}
editMode={props.editMode}
editingRows={props.editingRows}
onRowMouseEnter={props.onRowMouseEnter}
onRowMouseLeave={props.onRowMouseLeave}
onRowReorder={props.onRowReorder}
onRowSelect={props.onRowSelect}
onRowToggle={props.onRowToggle}
onRowUnselect={props.onRowUnselect}
onSelectionChange={props.onSelectionChange}
paginator={props.paginator}
reorderableRows={props.reorderableRows}
scrollable={props.scrollable}
rowGroupMode={props.rowGroupMode}
groupRowsBy={props.groupRowsBy}
expandableRowGroups={props.expandableRowGroups}
loading={props.loading}
emptyMessage={props.emptyMessage}
rowGroupHeaderTemplate={props.rowGroupHeaderTemplate}
responsiveLayout={props.responsiveLayout}
rowClassName={props.rowClassName}
rowEditValidator={props.rowEditValidator}
rowEditorCancelIcon={props.rowEditorCancelIcon}
rowEditorInitIcon={props.rowEditorInitIcon}
rowEditorSaveIcon={props.rowEditorSaveIcon}
rowExpansionTemplate={props.rowExpansionTemplate}
rowGroupFooterTemplate={props.rowGroupFooterTemplate}
onRowEditChange={props.onRowEditChange}
compareSelectionBy={props.compareSelectionBy}
rowGroupHeaderTemplate={props.rowGroupHeaderTemplate}
rowGroupMode={props.rowGroupMode}
scrollable={props.scrollable}
selectOnEdit={props.selectOnEdit}
onRowEditInit={props.onRowEditInit}
rowEditValidator={props.rowEditValidator}
onRowEditSave={props.onRowEditSave}
onRowEditComplete={props.onRowEditComplete}
onRowEditCancel={props.onRowEditCancel}
cellClassName={props.cellClassName}
responsiveLayout={props.responsiveLayout}
selection={props.selection}
selectionAutoFocus={props.selectionAutoFocus}
isDataSelectable={props.isDataSelectable}
showSelectionElement={props.showSelectionElement}
selectionMode={props.selectionMode}
selectionModeInColumn={selectionModeInColumn}
showRowReorderElement={props.showRowReorderElement}
expandedRowIcon={props.expandedRowIcon}
collapsedRowIcon={props.collapsedRowIcon}
checkIcon={props.checkIcon}
rowClassName={props.rowClassName}
showSelectionElement={props.showSelectionElement}
tabIndex={props.tabIndex}
tableProps={props}
tableSelector={attributeSelector.current}
value={props.frozenValue}
virtualScrollerOptions={options}
isVirtualScrollerDisabled={true}
/>
);
const body = (
Expand Down
99 changes: 51 additions & 48 deletions components/lib/datatable/TableBody.js
Original file line number Diff line number Diff line change
Expand Up @@ -854,67 +854,70 @@ export const TableBody = React.memo(

return (
<BodyRow
tableProps={props.tableProps}
tableSelector={props.tableSelector}
value={props.value}
allowCellSelection={_allowCellSelection}
allowRowSelection={_allowRowSelection}
cellClassName={props.cellClassName}
checkIcon={props.checkIcon}
collapsedRowIcon={props.collapsedRowIcon}
columns={props.columns}
rowData={rowData}
rowIndex={rowIndex}
index={index}
selected={selected}
compareSelectionBy={props.compareSelectionBy}
contextMenuSelected={contextMenuSelected}
onRowClick={onRowClick}
onRowDoubleClick={onRowDoubleClick}
onRowRightClick={onRowRightClick}
onRowMouseEnter={onRowMouseEnter}
onRowMouseLeave={onRowMouseLeave}
tabIndex={props.tabIndex}
dataKey={props.dataKey}
editMode={props.editMode}
editing={editing}
editingMeta={props.editingMeta}
editingRows={props.editingRows}
expanded={expanded}
expandedRowIcon={props.expandedRowIcon}
frozenRow={props.frozenRow}
groupRowsBy={props.groupRowsBy}
index={index}
isSelectable={isSelectable}
onRowTouchEnd={onRowTouchEnd}
onRowMouseDown={onRowMouseDown}
onRowMouseUp={onRowMouseUp}
onRowToggle={onRowToggle}
onRowDragStart={onRowDragStart}
onRowDragOver={onRowDragOver}
onRowDragLeave={onRowDragLeave}
onRowDragEnd={onRowDragEnd}
onRowDrop={onRowDrop}
onRadioChange={onRadioChange}
onCheckboxChange={onCheckboxChange}
onCellClick={onCellClick}
onCellMouseDown={onCellMouseDown}
onCellMouseUp={onCellMouseUp}
editing={editing}
editingRows={props.editingRows}
editingMeta={props.editingMeta}
editMode={props.editMode}
onRowEditChange={props.onRowEditChange}
onCheckboxChange={onCheckboxChange}
onEditingMetaChange={props.onEditingMetaChange}
groupRowsBy={props.groupRowsBy}
compareSelectionBy={props.compareSelectionBy}
dataKey={props.dataKey}
rowGroupMode={props.rowGroupMode}
onRadioChange={onRadioChange}
onRowClick={onRowClick}
onRowDoubleClick={onRowDoubleClick}
onRowDragEnd={onRowDragEnd}
onRowDragLeave={onRowDragLeave}
onRowDragOver={onRowDragOver}
onRowDragStart={onRowDragStart}
onRowDrop={onRowDrop}
onRowEditCancel={props.onRowEditCancel}
onRowEditChange={props.onRowEditChange}
onRowEditComplete={props.onRowEditComplete}
onRowEditInit={props.onRowEditInit}
rowEditValidator={props.rowEditValidator}
onRowEditSave={props.onRowEditSave}
onRowEditComplete={props.onRowEditComplete}
onRowEditCancel={props.onRowEditCancel}
selection={props.selection}
allowRowSelection={_allowRowSelection}
allowCellSelection={_allowCellSelection}
onRowMouseDown={onRowMouseDown}
onRowMouseEnter={onRowMouseEnter}
onRowMouseLeave={onRowMouseLeave}
onRowMouseUp={onRowMouseUp}
onRowRightClick={onRowRightClick}
onRowToggle={onRowToggle}
onRowTouchEnd={onRowTouchEnd}
responsiveLayout={props.responsiveLayout}
rowClassName={props.rowClassName}
rowData={rowData}
rowEditValidator={props.rowEditValidator}
rowEditorCancelIcon={props.rowEditorCancelIcon}
rowEditorInitIcon={props.rowEditorInitIcon}
rowEditorSaveIcon={props.rowEditorSaveIcon}
rowGroupMode={props.rowGroupMode}
rowIndex={rowIndex}
selectOnEdit={props.selectOnEdit}
selected={selected}
selection={props.selection}
selectionMode={props.selectionMode}
selectionModeInColumn={props.selectionModeInColumn}
cellClassName={props.cellClassName}
responsiveLayout={props.responsiveLayout}
frozenRow={props.frozenRow}
showSelectionElement={props.showSelectionElement}
showRowReorderElement={props.showRowReorderElement}
expanded={expanded}
expandedRowIcon={props.expandedRowIcon}
collapsedRowIcon={props.collapsedRowIcon}
checkIcon={props.checkIcon}
rowClassName={props.rowClassName}
showSelectionElement={props.showSelectionElement}
tabIndex={props.tabIndex}
tableProps={props.tableProps}
tableSelector={props.tableSelector}
value={props.value}
virtualScrollerOptions={props.virtualScrollerOptions}
/>
);
Expand Down