Skip to content

Commit

Permalink
provide null as default value to datetime picker; add test-id
Browse files Browse the repository at this point in the history
  • Loading branch information
tomaskikutis committed Jan 28, 2025
1 parent a55623a commit 14861e9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export class AuthoringSectionField<T> extends React.PureComponent<IProps<T>> {
);

return (
<div ref={this.props.fieldRef}>
<div ref={this.props.fieldRef} data-test-id="authoring-field" data-test-value={field.id}>
{canBeToggled && toggledOn === false ? (
<Container key={field.id} />
) : (
Expand Down
2 changes: 1 addition & 1 deletion scripts/apps/authoring-react/fields/datetime/editor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export class Editor extends React.PureComponent<IProps> {
hidden: true,
}}
onChange={this.props.onChange}
value={this.props.value}
value={this.props.value ?? null}
disabled={this.props.config.readOnly}
width={this.props.config.width}
/>
Expand Down

0 comments on commit 14861e9

Please sign in to comment.