Skip to content

Commit

Permalink
fix(evidence): year dropdown default val as array
Browse files Browse the repository at this point in the history
defaultValue arg of Dropdown component only accepts a string or an array
(a buggy thing), so this makes it work and default to the most recent
year.
  • Loading branch information
gwenwindflower committed Jun 30, 2024
1 parent 311ff40 commit d19d7b2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions reports/pages/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ order by count_of_trees desc
name="trees_planted_years"
data={trees_planted_years}
value="year"
defaultValue={2024}
defaultValue={[trees_planted_years[0].year]}
/>

<CalendarHeatmap
Expand Down Expand Up @@ -78,7 +78,7 @@ group by 1

```sql trees_planted_years
select
distinct date_part('year', planted_at_date)::int as year
distinct date_part('year', planted_at_date) as "year"

from dbtree.trees

Expand Down

0 comments on commit d19d7b2

Please sign in to comment.