diff --git a/components/lib/accordion/Accordion.js b/components/lib/accordion/Accordion.js index 373155304b..8da394d756 100644 --- a/components/lib/accordion/Accordion.js +++ b/components/lib/accordion/Accordion.js @@ -96,6 +96,7 @@ export const Accordion = React.forwardRef((props, ref) => { if (shouldUseTab(tab)) { const key = idState + '_' + index; const selected = isSelected(index); + const otherProps = ObjectUtils.findDiffKeys(tab.props, AccordionTab.defaultProps); const tabHeader = createTabHeader(tab, selected, index); const tabContent = createTabContent(tab, selected, index); const tabClassName = classNames('p-accordion-tab', { @@ -103,7 +104,7 @@ export const Accordion = React.forwardRef((props, ref) => { }); return ( -
+
{tabHeader} {tabContent}
@@ -117,11 +118,12 @@ export const Accordion = React.forwardRef((props, ref) => { return React.Children.map(props.children, createTab); } + const otherProps = ObjectUtils.findDiffKeys(props, Accordion.defaultProps); const className = classNames('p-accordion p-component', props.className); const tabs = createTabs(); return ( -
+
{tabs}
) diff --git a/components/lib/autocomplete/AutoComplete.js b/components/lib/autocomplete/AutoComplete.js index c975c0fe46..5bc7112b3d 100644 --- a/components/lib/autocomplete/AutoComplete.js +++ b/components/lib/autocomplete/AutoComplete.js @@ -537,6 +537,7 @@ export const AutoComplete = React.memo(React.forwardRef((props, ref) => { const listId = idState + '_list'; const hasTooltip = ObjectUtils.isNotEmpty(props.tooltip); + const otherProps = ObjectUtils.findDiffKeys(props, AutoComplete.defaultProps); const className = classNames('p-autocomplete p-component p-inputwrapper', { 'p-autocomplete-dd': props.dropdown, 'p-autocomplete-multiple': props.multiple, @@ -549,7 +550,7 @@ export const AutoComplete = React.memo(React.forwardRef((props, ref) => { return ( <> - + {input} {loader} {dropdown} diff --git a/components/lib/avatar/Avatar.js b/components/lib/avatar/Avatar.js index d0ee9fabfa..50b96e57f2 100644 --- a/components/lib/avatar/Avatar.js +++ b/components/lib/avatar/Avatar.js @@ -17,6 +17,7 @@ export const Avatar = React.forwardRef((props, ref) => { return null; } + const otherProps = ObjectUtils.findDiffKeys(props, Avatar.defaultProps); const containerClassName = classNames('p-avatar p-component', { 'p-avatar-image': props.image != null, 'p-avatar-circle': props.shape === 'circle', @@ -28,7 +29,7 @@ export const Avatar = React.forwardRef((props, ref) => { const content = props.template ? ObjectUtils.getJSXElement(props.template, props) : createContent(); return ( -
+
{content} {props.children}
@@ -47,6 +48,5 @@ Avatar.defaultProps = { className: null, template: null, imageAlt: 'avatar', - onImageError: null, - onClick: null + onImageError: null } diff --git a/components/lib/avatargroup/AvatarGroup.js b/components/lib/avatargroup/AvatarGroup.js index 1d6ebc8a47..57d391869c 100644 --- a/components/lib/avatargroup/AvatarGroup.js +++ b/components/lib/avatargroup/AvatarGroup.js @@ -1,11 +1,12 @@ import * as React from 'react'; -import { classNames } from '../utils/Utils'; +import { classNames, ObjectUtils } from '../utils/Utils'; export const AvatarGroup = React.forwardRef((props, ref) => { + const otherProps = ObjectUtils.findDiffKeys(props, AvatarGroup.defaultProps); const className = classNames('p-avatar-group p-component', props.className); return ( -
+
{props.children}
) diff --git a/components/lib/badge/Badge.js b/components/lib/badge/Badge.js index 30f5d1e128..823d1c9b9d 100644 --- a/components/lib/badge/Badge.js +++ b/components/lib/badge/Badge.js @@ -1,7 +1,8 @@ import * as React from 'react'; -import { classNames } from '../utils/Utils'; +import { classNames, ObjectUtils } from '../utils/Utils'; export const Badge = React.memo(React.forwardRef((props, ref) => { + const otherProps = ObjectUtils.findDiffKeys(props, Badge.defaultProps); const className = classNames('p-badge p-component', { 'p-badge-no-gutter': props.value && String(props.value).length === 1, 'p-badge-dot': !props.value, @@ -11,7 +12,7 @@ export const Badge = React.memo(React.forwardRef((props, ref) => { }, props.className); return ( - + {props.value} ) diff --git a/components/lib/blockui/BlockUI.js b/components/lib/blockui/BlockUI.js index 491695f731..b8c49ad833 100644 --- a/components/lib/blockui/BlockUI.js +++ b/components/lib/blockui/BlockUI.js @@ -86,10 +86,11 @@ export const BlockUI = React.forwardRef((props, ref) => { return null; } + const otherProps = ObjectUtils.findDiffKeys(props, BlockUI.defaultProps); const mask = createMask(); return ( -
+
{props.children} {mask}
diff --git a/components/lib/breadcrumb/BreadCrumb.js b/components/lib/breadcrumb/BreadCrumb.js index 6329938e80..bba7bdf9eb 100644 --- a/components/lib/breadcrumb/BreadCrumb.js +++ b/components/lib/breadcrumb/BreadCrumb.js @@ -94,13 +94,14 @@ export const BreadCrumb = React.memo(React.forwardRef((props, ref) => { return null; } + const otherProps = ObjectUtils.findDiffKeys(props, BreadCrumb.defaultProps); const className = classNames('p-breadcrumb p-component', props.className); const home = createHome(); const items = createMenuitems(); const separator = createSeparator(); return ( -