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 #3378: Data attributes not on hidden inputs #3379

Merged
merged 1 commit into from
Sep 28, 2022
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
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