Skip to content

Commit

Permalink
Fix date input always shows required error
Browse files Browse the repository at this point in the history
  • Loading branch information
Polleps committed Nov 18, 2024
1 parent 21da274 commit 121f416
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions browser/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,12 @@ This changelog covers all five packages, as they are (for now) updated as a whol
- [#989](https://github.com/atomicdata-dev/atomic-server/issues/989) Added an edit button to the resource selector inputs.
- [#992](https://github.com/atomicdata-dev/atomic-server/issues/992) Fix Searchbox overflowing when displaying long names.
- [#999](https://github.com/atomicdata-dev/atomic-server/issues/999) Fix parseMetaTags character escape issue.
- [#1014](https://github.com/atomicdata-dev/atomic-server/issues/1014) Fix date input always showing required error even when filled in.

### @tomic/lib

- `resource.props` is now writable: `resource.props.name = 'New Name'`.
- Added `store.preloadResourceTree()` method.
- `resource.props` is now writeable: `resource.props.name = 'New Name'`.
- Added `store.preloadResourceTree()` method, see docs for more info.
- Fix generated ontologies not working in a Next.js server context.

### @tomic/cli
Expand Down
2 changes: 1 addition & 1 deletion browser/data-browser/src/components/forms/InputDate.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export function InputDate({
const handleChange = (event: ChangeEvent<HTMLInputElement>) => {
const dateStr = event.target.value;

if (required && dateStr) {
if (required && !dateStr) {
setError('Required');
setValue(undefined);
} else {
Expand Down

0 comments on commit 121f416

Please sign in to comment.