Skip to content

Commit

Permalink
fix(pf4): fix date and time picker change attributes order
Browse files Browse the repository at this point in the history
  • Loading branch information
Hyperkid123 committed Jan 8, 2024
1 parent a2bbd24 commit c05811a
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
8 changes: 7 additions & 1 deletion packages/pf4-component-mapper/src/date-picker/date-picker.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,13 @@ const DatePicker = (props) => {
id={id || input.name}
FormGroupProps={FormGroupProps}
>
<PF4DatePicker {...input} {...rest} id={id || input.name} isDisabled={isDisabled || isReadOnly} />
<PF4DatePicker
{...input}
onChange={(_e, value) => input.onChange(value)}

Check warning on line 24 in packages/pf4-component-mapper/src/date-picker/date-picker.js

View check run for this annotation

Codecov / codecov/patch

packages/pf4-component-mapper/src/date-picker/date-picker.js#L24

Added line #L24 was not covered by tests
{...rest}
id={id || input.name}
isDisabled={isDisabled || isReadOnly}
/>
</FormGroup>
);
};
Expand Down
9 changes: 8 additions & 1 deletion packages/pf4-component-mapper/src/time-picker/time-picker.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,14 @@ const TimePicker = (props) => {
id={id || input.name}
FormGroupProps={FormGroupProps}
>
<PF4TimePicker {...input} time={input.value ? input.value : undefined} {...rest} id={id || input.name} isDisabled={isDisabled || isReadOnly} />
<PF4TimePicker
{...input}
onChange={(_e, value) => input.onChange(value)}

Check warning on line 24 in packages/pf4-component-mapper/src/time-picker/time-picker.js

View check run for this annotation

Codecov / codecov/patch

packages/pf4-component-mapper/src/time-picker/time-picker.js#L24

Added line #L24 was not covered by tests
time={input.value ? input.value : undefined}
{...rest}
id={id || input.name}
isDisabled={isDisabled || isReadOnly}
/>
</FormGroup>
);
};
Expand Down

0 comments on commit c05811a

Please sign in to comment.