Skip to content

Commit

Permalink
Fix primefaces#3378: Data attributes not on hidden inputs
Browse files Browse the repository at this point in the history
  • Loading branch information
melloware committed Sep 28, 2022
1 parent 5fc5825 commit 9872b8c
Show file tree
Hide file tree
Showing 6 changed files with 1 addition and 13 deletions.
3 changes: 0 additions & 3 deletions components/lib/autocomplete/AutoComplete.js
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,6 @@ export const AutoComplete = React.memo(
onClick={props.onClick}
onDoubleClick={props.onDblClick}
{...ariaProps}
{...dataProps}
/>
);
};
Expand Down Expand Up @@ -563,7 +562,6 @@ export const AutoComplete = React.memo(
onFocus={onMultiInputFocus}
onBlur={onMultiInputBlur}
{...ariaProps}
{...dataProps}
/>
</li>
);
Expand Down Expand Up @@ -609,7 +607,6 @@ export const AutoComplete = React.memo(
const listId = idState + '_list';
const hasTooltip = ObjectUtils.isNotEmpty(props.tooltip);
const otherProps = ObjectUtils.findDiffKeys(props, AutoComplete.defaultProps);
const dataProps = ObjectUtils.reduceKeys(otherProps, DomHandler.DATA_PROPS);
const ariaProps = ObjectUtils.reduceKeys(otherProps, DomHandler.ARIA_PROPS);
const className = classNames(
'p-autocomplete p-component p-inputwrapper',
Expand Down
2 changes: 0 additions & 2 deletions components/lib/checkbox/Checkbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ export const Checkbox = React.memo(
const checked = isChecked();
const hasTooltip = ObjectUtils.isNotEmpty(props.tooltip);
const otherProps = ObjectUtils.findDiffKeys(props, Checkbox.defaultProps);
const dataProps = ObjectUtils.reduceKeys(otherProps, DomHandler.DATA_PROPS);
const ariaProps = ObjectUtils.reduceKeys(otherProps, DomHandler.ARIA_PROPS);
const className = classNames(
'p-checkbox p-component',
Expand Down Expand Up @@ -111,7 +110,6 @@ export const Checkbox = React.memo(
readOnly={props.readOnly}
required={props.required}
{...ariaProps}
{...dataProps}
/>
</div>
<div className={boxClass}>{icon}</div>
Expand Down
3 changes: 1 addition & 2 deletions components/lib/dropdown/Dropdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -640,7 +640,7 @@ export const Dropdown = React.memo(

return (
<div className="p-hidden-accessible p-dropdown-hidden-select">
<select ref={inputRef} required={props.required} defaultValue={option.value} name={props.name} tabIndex={-1} aria-hidden="true" {...dataProps}>
<select ref={inputRef} required={props.required} defaultValue={option.value} name={props.name} tabIndex={-1} aria-hidden="true">
<option value={option.value}>{option.label}</option>
</select>
</div>
Expand Down Expand Up @@ -728,7 +728,6 @@ export const Dropdown = React.memo(

const hasTooltip = ObjectUtils.isNotEmpty(props.tooltip);
const otherProps = ObjectUtils.findDiffKeys(props, Dropdown.defaultProps);
const dataProps = ObjectUtils.reduceKeys(otherProps, DomHandler.DATA_PROPS);
const ariaProps = ObjectUtils.reduceKeys(otherProps, DomHandler.ARIA_PROPS);
const className = classNames(
'p-dropdown p-component p-inputwrapper',
Expand Down
2 changes: 0 additions & 2 deletions components/lib/inputswitch/InputSwitch.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ export const InputSwitch = React.memo(

const hasTooltip = ObjectUtils.isNotEmpty(props.tooltip);
const otherProps = ObjectUtils.findDiffKeys(props, InputSwitch.defaultProps);
const dataProps = ObjectUtils.reduceKeys(otherProps, DomHandler.DATA_PROPS);
const ariaProps = ObjectUtils.reduceKeys(otherProps, DomHandler.ARIA_PROPS);
const className = classNames(
'p-inputswitch p-component',
Expand Down Expand Up @@ -90,7 +89,6 @@ export const InputSwitch = React.memo(
tabIndex={props.tabIndex}
aria-checked={checked}
{...ariaProps}
{...dataProps}
/>
</div>
<span className="p-inputswitch-slider"></span>
Expand Down
2 changes: 0 additions & 2 deletions components/lib/multiselect/MultiSelect.js
Original file line number Diff line number Diff line change
Expand Up @@ -567,7 +567,6 @@ export const MultiSelect = React.memo(

const hasTooltip = ObjectUtils.isNotEmpty(props.tooltip);
const otherProps = ObjectUtils.findDiffKeys(props, MultiSelect.defaultProps);
const dataProps = ObjectUtils.reduceKeys(otherProps, DomHandler.DATA_PROPS);
const ariaProps = ObjectUtils.reduceKeys(otherProps, DomHandler.ARIA_PROPS);
const className = classNames(
'p-multiselect p-component p-inputwrapper',
Expand Down Expand Up @@ -602,7 +601,6 @@ export const MultiSelect = React.memo(
disabled={props.disabled}
tabIndex={props.tabIndex}
{...ariaProps}
{...dataProps}
/>
</div>
{label}
Expand Down
2 changes: 0 additions & 2 deletions components/lib/radiobutton/RadioButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ export const RadioButton = React.memo(

const hasTooltip = ObjectUtils.isNotEmpty(props.tooltip);
const otherProps = ObjectUtils.findDiffKeys(props, RadioButton.defaultProps);
const dataProps = ObjectUtils.reduceKeys(otherProps, DomHandler.DATA_PROPS);
const ariaProps = ObjectUtils.reduceKeys(otherProps, DomHandler.ARIA_PROPS);
const className = classNames(
'p-radiobutton p-component',
Expand Down Expand Up @@ -111,7 +110,6 @@ export const RadioButton = React.memo(
required={props.required}
tabIndex={props.tabIndex}
{...ariaProps}
{...dataProps}
/>
</div>
<div className={boxClassName}>
Expand Down

0 comments on commit 9872b8c

Please sign in to comment.