Fix react select option selected warning, #863

This commit is contained in:
MerlinScheurer 2025-01-11 12:33:39 +01:00
parent 21c127d0fa
commit 73396da7f6
1 changed files with 3 additions and 4 deletions

View File

@ -229,6 +229,7 @@ const Download = () => {
<select
name="channel_filter"
id="channel_filter"
value={channelFilterFromUrl || 'all'}
onChange={async event => {
const value = event.currentTarget.value;
@ -240,15 +241,13 @@ const Download = () => {
setSearchParams(params);
}}
>
<option value="all" selected={!channelFilterFromUrl}>
all
</option>
<option value="all">all</option>
{channelAggsList.map(channel => {
const [name, id] = channel.key;
const count = channel.doc_count;
return (
<option key={id} selected={channelFilterFromUrl == id} value={id}>
<option key={id} value={id}>
{name} ({count})
</option>
);