Skip to content

Commit

Permalink
Fix mapping in select menu
Browse files Browse the repository at this point in the history
Signed-off-by: Andrei Stepanov <astepano@redhat.com>
  • Loading branch information
Andrei-Stepanov authored and mgrabovsky committed Jul 31, 2023
1 parent b316810 commit 67c42c8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
7 changes: 4 additions & 3 deletions src/actions/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* This file is part of ciboard
* Copyright (c) 2021, 2022 Andrei Stepanov <astepano@redhat.com>
* Copyright (c) 2021, 2022, 2023 Andrei Stepanov <astepano@redhat.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
Expand Down Expand Up @@ -83,11 +83,12 @@ export const addFilter = (newval = '', type = '') => {
const activeFilters = filters.active;
const foreignRegex = /[^\u0000-\u007f]/;
if (foreignRegex.test(newval)) {
console.log('Ignoring filter with no-latin character:', newval);
console.log('Ignoring filter with no-latin character: %s', newval);
return null;
}
console.log('%O', { newval, type });
if (!_.has(db_field_from_atype, type)) {
console.log('Ignoring filter with unsupported type:', type);
console.log('Ignoring filter with unsupported type: %s', type);
return null;
}
console.log('Add new filter', type, newval);
Expand Down
4 changes: 2 additions & 2 deletions src/components/PageByFilters.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* This file is part of ciboard
*
* Copyright (c) 2021 Andrei Stepanov <astepano@redhat.com>
* Copyright (c) 2021, 2023 Andrei Stepanov <astepano@redhat.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
Expand Down Expand Up @@ -76,7 +76,7 @@ const menuTypes = {
'Compose ID': 'productmd-compose',
};

const statusMenuItems = _.map(menuTypes, (menuName, key) => (
const statusMenuItems = _.map(menuTypes, (key, menuName) => (
<SelectOption key={key} value={menuName} />
));

Expand Down

0 comments on commit 67c42c8

Please sign in to comment.