fix(ui-mode): use onChange instead of onClick for <input type='checkbox' (#33636)

This commit is contained in:
Max Schmitt 2024-11-18 10:21:28 +01:00 committed by GitHub
parent 82c77a5e9e
commit 6fce5620e0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 3 deletions

View File

@ -30,7 +30,7 @@ export const SettingsView: React.FunctionComponent<{
{settings.map(({ value, set, title }) => {
return <div key={title} className='setting'>
<label>
<input type='checkbox' checked={value} onClick={() => set(!value)}/>
<input type='checkbox' checked={value} onChange={() => set(!value)}/>
{title}
</label>
</div>;

View File

@ -62,7 +62,7 @@ export const FiltersView: React.FC<{
{[...statusFilters.entries()].map(([status, value]) => {
return <div className='filter-entry' key={status} role='listitem'>
<label>
<input type='checkbox' checked={value} onClick={() => {
<input type='checkbox' checked={value} onChange={() => {
const copy = new Map(statusFilters);
copy.set(status, !copy.get(status));
setStatusFilters(copy);
@ -76,7 +76,7 @@ export const FiltersView: React.FC<{
{[...projectFilters.entries()].map(([projectName, value]) => {
return <div className='filter-entry' key={projectName} role='listitem'>
<label>
<input type='checkbox' checked={value} onClick={() => {
<input type='checkbox' checked={value} onChange={() => {
const copy = new Map(projectFilters);
copy.set(projectName, !copy.get(projectName));
setProjectFilters(copy);