Skip to content

Fix/1964 recipe search is not working #1965

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Dec 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
[#1950](https://github.com./nextcloud/cookbook/pull/1950) @christianlupus
- **Settings:** Don't show error when update interval field is empty while typing.
[#1963](https://github.com./nextcloud/cookbook/pull/1963) @seyfeb
- Fix searching recipes by string.
[#1965](https://github.com./nextcloud/cookbook/pull/1965) @seyfeb

### Maintenance
- Add PHP lint checker to ensure valid (legacy) PHP syntax
Expand Down
13 changes: 11 additions & 2 deletions src/components/AppControls/AppControls.vue
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,17 @@
icon="icon-quota"
:value="filterValue"
@update:value="updateFilters"
aria-label="Filter current recipes"
>
<template #icon>
<FilterIcon :size="20" />
</template>
{{ t('cookbook', 'Filter') }}
</NcActionInput>
<NcActionInput icon="icon-search" @submit="search">
<NcActionInput @submit="search" aria-label="Search recipes">
<template #icon>
<SearchIcon :size="20" />
</template>
{{ t('cookbook', 'Search') }}
</NcActionInput>
</NcActions>
Expand Down Expand Up @@ -197,9 +204,11 @@ import NcLoadingIcon from '@nextcloud/vue/dist/Components/NcLoadingIcon.js';
import PencilIcon from 'icons/Pencil.vue';
import LoadingIcon from 'icons/Loading.vue';
import CheckmarkIcon from 'icons/Check.vue';
import FilterIcon from 'icons/FilterOutline.vue';
import PrinterIcon from 'icons/Printer.vue';
import EyeIcon from 'icons/Eye.vue';
import ContentDuplicateIcon from 'icons/ContentDuplicate.vue';
import SearchIcon from 'icons/Magnify.vue';

import helpers from 'cookbook/js/helper';
import {
Expand Down Expand Up @@ -317,7 +326,7 @@ const saveChanges = () => {
};

const search = (e) => {
helpers.goTo(`/search/${e.target[1].value}`);
helpers.goTo(`/search/${e.target[0].value}`);
};

const updateFilters = (e) => {
Expand Down