Skip to content

Commit a42bd36

Browse files
authored
Merge branch 'primefaces:master' into new-feature-primefaces#4134
2 parents 24da98f + cc8d957 commit a42bd36

File tree

17 files changed

+222
-188
lines changed

17 files changed

+222
-188
lines changed

components/doc/common/apidoc/index.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23287,7 +23287,7 @@
2328723287
"name": "separator",
2328823288
"optional": true,
2328923289
"readonly": false,
23290-
"type": "MegaMenuPassThroughType<HTMLAttributes<HTMLDivElement>>",
23290+
"type": "MegaMenuPassThroughType<HTMLAttributes<HTMLLIElement>>",
2329123291
"description": "Uses to pass attributes to the separator's DOM element."
2329223292
},
2329323293
{
@@ -24219,21 +24219,21 @@
2421924219
"name": "popupIcon",
2422024220
"optional": true,
2422124221
"readonly": false,
24222-
"type": "MenubarPassThroughType<HTMLAttributes<HTMLElement>>",
24222+
"type": "MenubarPassThroughType<HTMLAttributes<HTMLSpanElement> | SVGProps<SVGSVGElement>>",
2422324223
"description": "Uses to pass attributes to the mobile popup menu button icon's DOM element."
2422424224
},
2422524225
{
2422624226
"name": "start",
2422724227
"optional": true,
2422824228
"readonly": false,
24229-
"type": "MenubarPassThroughType<HTMLAttributes<HTMLElement>>",
24229+
"type": "MenubarPassThroughType<HTMLAttributes<HTMLDivElement>>",
2423024230
"description": "Uses to pass attributes to the start of the component."
2423124231
},
2423224232
{
2423324233
"name": "end",
2423424234
"optional": true,
2423524235
"readonly": false,
24236-
"type": "MenubarPassThroughType<HTMLAttributes<HTMLElement>>",
24236+
"type": "MenubarPassThroughType<HTMLAttributes<HTMLDivElement>>",
2423724237
"description": "Uses to pass attributes to the end of the component."
2423824238
}
2423924239
],
@@ -27089,21 +27089,21 @@
2708927089
"optional": false,
2709027090
"readonly": false,
2709127091
"type": "number",
27092-
"description": "New page number"
27092+
"description": "Index of first record"
2709327093
},
2709427094
{
2709527095
"name": "rows",
2709627096
"optional": false,
2709727097
"readonly": false,
2709827098
"type": "number",
27099-
"description": "Index of first record"
27099+
"description": "Number of rows to display in new page"
2710027100
},
2710127101
{
2710227102
"name": "page",
2710327103
"optional": false,
2710427104
"readonly": false,
2710527105
"type": "number",
27106-
"description": "Number of rows to display in new page"
27106+
"description": "New page number"
2710727107
},
2710827108
{
2710927109
"name": "pageCount",
@@ -32997,7 +32997,7 @@
3299732997
"name": "icon",
3299832998
"optional": true,
3299932999
"readonly": false,
33000-
"type": "StepsPassThroughType<SVGProps<SVGSVGElement> | HTMLAttributes<SVGSVGElement | HTMLSpanElement>>",
33000+
"type": "StepsPassThroughType<HTMLAttributes<HTMLSpanElement> | SVGProps<SVGSVGElement>>",
3300133001
"description": "Uses to pass attributes to the icon's DOM element."
3300233002
}
3300333003
],
@@ -33299,7 +33299,7 @@
3329933299
"name": "icon",
3330033300
"optional": true,
3330133301
"readonly": false,
33302-
"type": "TabMenuPassThroughType<SVGProps<SVGSVGElement> | HTMLAttributes<SVGSVGElement | HTMLSpanElement>>",
33302+
"type": "TabMenuPassThroughType<HTMLAttributes<HTMLSpanElement> | SVGProps<SVGSVGElement>>",
3330333303
"description": "Uses to pass attributes to the icon's DOM element."
3330433304
},
3330533305
{

components/doc/contextmenu/pt/ptdoc.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -445,11 +445,7 @@ export default function PTDemo() {
445445

446446
return (
447447
<>
448-
<DocSectionText {...props}>
449-
<p>
450-
ContextMenu requires a collection of menuitems as its <i>model</i> and the <i>show</i> method needs to be called explicity using the <i>onContextMenu</i> event of the target to display the menu.
451-
</p>
452-
</DocSectionText>
448+
<DocSectionText {...props}></DocSectionText>
453449
<div className="card flex md:justify-content-center">
454450
<ContextMenu
455451
model={items}

components/doc/messages/pt/ptdoc.js

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ export function PTDoc(props) {
88
const msgs = useRef(null);
99

1010
useMountEffect(() => {
11-
msgs.current && msgs.current.show({ id: '1', sticky: true, severity: 'info', summary: 'Info', detail: 'Message Content', closable: false });
11+
msgs.current && msgs.current.show([{ sticky: true, severity: 'info', summary: 'Info', detail: 'Message Content', closable: false }]);
1212
});
1313

1414
const code = {
1515
basic: `
1616
<Messages
1717
ref={msgs}
1818
pt={{
19-
root: { className: 'bg-yellow-100' }
19+
wrapper: { className: 'bg-yellow-100' }
2020
}}
2121
/>
2222
`,
@@ -29,15 +29,17 @@ export default function PTDemo() {
2929
const msgs = useRef(null);
3030
3131
useMountEffect(() => {
32-
msgs.current && msgs.current.show({ id: '1', sticky: true, severity: 'info', summary: 'Info', detail: 'Message Content', closable: false });
32+
msgs.current && msgs.current.show([
33+
{ sticky: true, severity: 'info', summary: 'Info', detail: 'Message Content', closable: false }
34+
]);
3335
});
3436
3537
return (
3638
<div className="card">
3739
<Messages
3840
ref={msgs}
3941
pt={{
40-
root: { className: 'bg-yellow-100' }
42+
wrapper: { className: 'bg-yellow-100' }
4143
}}
4244
/>
4345
</div>
@@ -53,15 +55,17 @@ export default function PTDemo() {
5355
const msgs = useRef(null);
5456
5557
useMountEffect(() => {
56-
msgs.current && msgs.current.show({ id: '1', sticky: true, severity: 'info', summary: 'Info', detail: 'Message Content', closable: false });
58+
msgs.current && msgs.current.show([
59+
{ sticky: true, severity: 'info', summary: 'Info', detail: 'Message Content', closable: false }
60+
]);
5761
});
5862
5963
return (
6064
<div className="card">
6165
<Messages
6266
ref={msgs}
6367
pt={{
64-
root: { className: 'bg-yellow-100' }
68+
wrapper: { className: 'bg-yellow-100' }
6569
}}
6670
/>
6771
</div>
@@ -77,7 +81,7 @@ export default function PTDemo() {
7781
<Messages
7882
ref={msgs}
7983
pt={{
80-
root: { className: 'bg-yellow-100' }
84+
wrapper: { className: 'bg-yellow-100' }
8185
}}
8286
/>
8387
</div>

components/doc/multiselect/basicdoc.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ export default function BasicDemo() {
7979
</p>
8080
</DocSectionText>
8181
<div className="card flex justify-content-center">
82-
<MultiSelect value={selectedCities} onChange={(e) => setSelectedCities(e.value)} options={cities} optionLabel="name" placeholder="Select Cities" maxSelectedLabels={3} className="w-full md:w-20rem" />
82+
<MultiSelect value={selectedCities} onChange={(e) => setSelectedCities(e.value)} showClear={true} options={cities} optionLabel="name" placeholder="Select Cities" maxSelectedLabels={3} className="w-full md:w-20rem" />
8383
</div>
8484
<DocSectionCode code={code} />
8585
</>

components/lib/datatable/BodyRow.js

Lines changed: 32 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -304,45 +304,48 @@ export const BodyRow = React.memo((props) => {
304304
return (
305305
<BodyCell
306306
key={key}
307-
value={props.value}
308-
tableProps={props.tableProps}
309-
tableSelector={props.tableSelector}
307+
allowCellSelection={props.allowCellSelection}
308+
cellClassName={props.cellClassName}
309+
checkIcon={props.checkIcon}
310+
collapsedRowIcon={props.collapsedRowIcon}
310311
column={col}
311-
rowData={props.rowData}
312-
rowIndex={props.rowIndex}
313-
index={i}
314-
rowSpan={rowSpan}
312+
compareSelectionBy={props.compareSelectionBy}
315313
dataKey={props.dataKey}
314+
editMode={props.editMode}
316315
editing={editing}
317316
editingMeta={props.editingMeta}
318-
editMode={props.editMode}
317+
expanded={props.expanded}
318+
expandedRowIcon={props.expandedRowIcon}
319+
frozenRow={props.frozenRow}
320+
index={i}
321+
isSelectable={props.isSelectable}
322+
onCheckboxChange={props.onCheckboxChange}
323+
onClick={props.onCellClick}
324+
onEditingMetaChange={props.onEditingMetaChange}
325+
onMouseDown={props.onCellMouseDown}
326+
onMouseUp={props.onCellMouseUp}
327+
onRadioChange={props.onRadioChange}
328+
onRowEditCancel={onEditCancel}
319329
onRowEditInit={onEditInit}
320330
onRowEditSave={onEditSave}
321-
onRowEditCancel={onEditCancel}
322-
onEditingMetaChange={props.onEditingMetaChange}
323331
onRowToggle={props.onRowToggle}
324-
selection={props.selection}
325-
selectionAriaLabel={props.tableProps.selectionAriaLabel}
326-
allowCellSelection={props.allowCellSelection}
327-
compareSelectionBy={props.compareSelectionBy}
332+
responsiveLayout={props.responsiveLayout}
333+
rowData={props.rowData}
334+
rowEditorCancelIcon={props.rowEditorCancelIcon}
335+
rowEditorInitIcon={props.rowEditorInitIcon}
336+
rowEditorSaveIcon={props.rowEditorSaveIcon}
337+
rowIndex={props.rowIndex}
338+
rowSpan={rowSpan}
328339
selectOnEdit={props.selectOnEdit}
329340
selected={props.selected}
330-
onClick={props.onCellClick}
331-
onMouseDown={props.onCellMouseDown}
332-
onMouseUp={props.onCellMouseUp}
333-
tabIndex={props.tabIndex}
334-
cellClassName={props.cellClassName}
335-
responsiveLayout={props.responsiveLayout}
336-
frozenRow={props.frozenRow}
337-
isSelectable={props.isSelectable}
338-
showSelectionElement={props.showSelectionElement}
341+
selection={props.selection}
342+
selectionAriaLabel={props.tableProps.selectionAriaLabel}
339343
showRowReorderElement={props.showRowReorderElement}
340-
onRadioChange={props.onRadioChange}
341-
onCheckboxChange={props.onCheckboxChange}
342-
expanded={props.expanded}
343-
expandedRowIcon={props.expandedRowIcon}
344-
collapsedRowIcon={props.collapsedRowIcon}
345-
checkIcon={props.checkIcon}
344+
showSelectionElement={props.showSelectionElement}
345+
tabIndex={props.tabIndex}
346+
tableProps={props.tableProps}
347+
tableSelector={props.tableSelector}
348+
value={props.value}
346349
virtualScrollerOptions={props.virtualScrollerOptions}
347350
/>
348351
);

components/lib/datatable/DataTable.js

Lines changed: 54 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1486,75 +1486,78 @@ export const DataTable = React.forwardRef((inProps, ref) => {
14861486
const frozenBody = ObjectUtils.isNotEmpty(props.frozenValue) && (
14871487
<TableBody
14881488
ref={frozenBodyRef}
1489-
value={props.frozenValue}
1489+
cellClassName={props.cellClassName}
1490+
cellSelection={props.cellSelection}
1491+
checkIcon={props.checkIcon}
14901492
className="p-datatable-tbody p-datatable-frozen-tbody"
1491-
frozenRow
1492-
tableProps={props}
1493-
tableSelector={attributeSelector.current}
1493+
collapsedRowIcon={props.collapsedRowIcon}
14941494
columns={columns}
1495-
selectionModeInColumn={selectionModeInColumn}
1496-
first={first}
1495+
compareSelectionBy={props.compareSelectionBy}
1496+
contextMenuSelection={props.contextMenuSelection}
1497+
dataKey={props.dataKey}
1498+
dragSelection={props.dragSelection}
1499+
editMode={props.editMode}
14971500
editingMeta={editingMetaState}
1498-
onEditingMetaChange={onEditingMetaChange}
1499-
tabIndex={props.tabIndex}
1500-
onRowClick={props.onRowClick}
1501-
onRowDoubleClick={props.onRowDoubleClick}
1502-
onRowMouseEnter={props.onRowMouseEnter}
1503-
onRowMouseLeave={props.onRowMouseLeave}
1504-
onCellClick={props.onCellClick}
1505-
selection={props.selection}
1506-
onSelectionChange={props.onSelectionChange}
1501+
editingRows={props.editingRows}
1502+
emptyMessage={props.emptyMessage}
1503+
expandableRowGroups={props.expandableRowGroups}
1504+
expandedRowIcon={props.expandedRowIcon}
1505+
expandedRows={props.expandedRows}
1506+
first={first}
1507+
frozenRow
1508+
groupRowsBy={props.groupRowsBy}
1509+
isDataSelectable={props.isDataSelectable}
1510+
isVirtualScrollerDisabled={true}
15071511
lazy={props.lazy}
1508-
paginator={props.paginator}
1512+
loading={props.loading}
1513+
metaKeySelection={props.metaKeySelection}
1514+
onCellClick={props.onCellClick}
15091515
onCellSelect={props.onCellSelect}
15101516
onCellUnselect={props.onCellUnselect}
1511-
onRowSelect={props.onRowSelect}
1512-
onRowUnselect={props.onRowUnselect}
1513-
dragSelection={props.dragSelection}
15141517
onContextMenu={props.onContextMenu}
15151518
onContextMenuSelectionChange={props.onContextMenuSelectionChange}
1516-
metaKeySelection={props.metaKeySelection}
1517-
selectionMode={props.selectionMode}
1518-
cellSelection={props.cellSelection}
1519-
contextMenuSelection={props.contextMenuSelection}
1520-
dataKey={props.dataKey}
1521-
expandedRows={props.expandedRows}
1519+
onEditingMetaChange={onEditingMetaChange}
1520+
onRowClick={props.onRowClick}
15221521
onRowCollapse={props.onRowCollapse}
1522+
onRowDoubleClick={props.onRowDoubleClick}
1523+
onRowEditCancel={props.onRowEditCancel}
1524+
onRowEditChange={props.onRowEditChange}
1525+
onRowEditComplete={props.onRowEditComplete}
1526+
onRowEditInit={props.onRowEditInit}
1527+
onRowEditSave={props.onRowEditSave}
15231528
onRowExpand={props.onRowExpand}
1524-
onRowToggle={props.onRowToggle}
1525-
editMode={props.editMode}
1526-
editingRows={props.editingRows}
1529+
onRowMouseEnter={props.onRowMouseEnter}
1530+
onRowMouseLeave={props.onRowMouseLeave}
15271531
onRowReorder={props.onRowReorder}
1532+
onRowSelect={props.onRowSelect}
1533+
onRowToggle={props.onRowToggle}
1534+
onRowUnselect={props.onRowUnselect}
1535+
onSelectionChange={props.onSelectionChange}
1536+
paginator={props.paginator}
15281537
reorderableRows={props.reorderableRows}
1529-
scrollable={props.scrollable}
1530-
rowGroupMode={props.rowGroupMode}
1531-
groupRowsBy={props.groupRowsBy}
1532-
expandableRowGroups={props.expandableRowGroups}
1533-
loading={props.loading}
1534-
emptyMessage={props.emptyMessage}
1535-
rowGroupHeaderTemplate={props.rowGroupHeaderTemplate}
1538+
responsiveLayout={props.responsiveLayout}
1539+
rowClassName={props.rowClassName}
1540+
rowEditValidator={props.rowEditValidator}
1541+
rowEditorCancelIcon={props.rowEditorCancelIcon}
1542+
rowEditorInitIcon={props.rowEditorInitIcon}
1543+
rowEditorSaveIcon={props.rowEditorSaveIcon}
15361544
rowExpansionTemplate={props.rowExpansionTemplate}
15371545
rowGroupFooterTemplate={props.rowGroupFooterTemplate}
1538-
onRowEditChange={props.onRowEditChange}
1539-
compareSelectionBy={props.compareSelectionBy}
1546+
rowGroupHeaderTemplate={props.rowGroupHeaderTemplate}
1547+
rowGroupMode={props.rowGroupMode}
1548+
scrollable={props.scrollable}
15401549
selectOnEdit={props.selectOnEdit}
1541-
onRowEditInit={props.onRowEditInit}
1542-
rowEditValidator={props.rowEditValidator}
1543-
onRowEditSave={props.onRowEditSave}
1544-
onRowEditComplete={props.onRowEditComplete}
1545-
onRowEditCancel={props.onRowEditCancel}
1546-
cellClassName={props.cellClassName}
1547-
responsiveLayout={props.responsiveLayout}
1550+
selection={props.selection}
15481551
selectionAutoFocus={props.selectionAutoFocus}
1549-
isDataSelectable={props.isDataSelectable}
1550-
showSelectionElement={props.showSelectionElement}
1552+
selectionMode={props.selectionMode}
1553+
selectionModeInColumn={selectionModeInColumn}
15511554
showRowReorderElement={props.showRowReorderElement}
1552-
expandedRowIcon={props.expandedRowIcon}
1553-
collapsedRowIcon={props.collapsedRowIcon}
1554-
checkIcon={props.checkIcon}
1555-
rowClassName={props.rowClassName}
1555+
showSelectionElement={props.showSelectionElement}
1556+
tabIndex={props.tabIndex}
1557+
tableProps={props}
1558+
tableSelector={attributeSelector.current}
1559+
value={props.frozenValue}
15561560
virtualScrollerOptions={options}
1557-
isVirtualScrollerDisabled={true}
15581561
/>
15591562
);
15601563
const body = (

0 commit comments

Comments
 (0)