Skip to content

Commit

Permalink
Change default year value type and form
Browse files Browse the repository at this point in the history
  • Loading branch information
Igor Escalona committed Oct 1, 2024
1 parent 69ba9b9 commit 7b2f27f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/generated/typings/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ export type SortOrder = "Asc" | "Dsc";
* Track
* represent a single track, id and path should be unique
*/
export type Track = { _id: string, title: string, album: string, artists: Array<string>, genres: Array<string>, year: number, duration: number, track: NumberOf, disk: NumberOf, path: string, };
export type Track = { _id: string, title: string, album: string, artists: Array<string>, genres: Array<string>, year: number | null, duration: number, track: NumberOf, disk: NumberOf, path: string, };
2 changes: 1 addition & 1 deletion src/views/ViewTrackDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ export default function ViewTrackDetails() {
type="number"
min="1900"
step="1"
value={formData.year}
value={formData.year ?? 0}
onChange={(e) => {
setFormData({ ...formData, year: Number(e.currentTarget.value) });
}}
Expand Down

0 comments on commit 7b2f27f

Please sign in to comment.