Signed-off-by: Virginie Ky <virginie.ky@gmail.com>
This commit is contained in:
Virginie Ky 2020-03-18 10:49:42 +01:00
parent 5614acdf9c
commit a78cbf3c22

View File

@ -27,7 +27,7 @@ const FiltersCard = ({ onChange }) => {
dispatch({
type: 'ON_CHANGE',
name,
value: value === 'file' ? 'application' : value,
value: value === 'file' ? 'application' : value, // the value is different from param used by backend
});
};
@ -49,18 +49,9 @@ const FiltersCard = ({ onChange }) => {
const renderNamesOptions = () => {
return Object.keys(filters).map(key => {
if (key === 'mime') {
// the type name is different from param used by backend
return (
<option key={key} value={key}>
type
</option>
);
}
return (
<option key={key} value={key}>
{key}
{key === 'mime' ? 'type' : key}
</option>
);
});