Skip to content
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

Tag search does not work anymore #3662

Closed
nickvergessen opened this issue Jan 17, 2023 · 6 comments · Fixed by #3747
Closed

Tag search does not work anymore #3662

nickvergessen opened this issue Jan 17, 2023 · 6 comments · Fixed by #3747
Assignees
Labels
3. to review Waiting for reviews bug Something isn't working feature: select Related to the NcSelect* components

Comments

@nickvergessen
Copy link
Contributor

Ref nextcloud/server#36152

Steps to reproduce

  1. Create tags test-1 until test-10
  2. Go to any other place where tags can be selected (the tag management does not use the component yet), e.g. creating a workflow with automated tagging: https://github.com/nextcloud/files_automatedtagging
  3. Search for test-6 and try to pick it.

Expected

Option is displayed

Actual

The result list is empty

Guess

The problem is that the custom filter is applied before the search:
https://github.com/nextcloud/nextcloud-vue/blob/4df172ae3869cec3733daa207308f6cf701aedbc/src/components/NcMultiselectTags/NcMultiselectTags.vue#L200-L205
https://github.com/nextcloud/nextcloud-vue/blob/84e7175ac2fd48c578187ae9de496ca3cbd498ac/src/components/NcSelectTags/NcSelectTags.vue#L261-L266

So we proceed with 5 items (default filter) into the search and then have no results left.

@nickvergessen nickvergessen added bug Something isn't working 1. to develop Accepted and waiting to be taken care of feature: select Related to the NcSelect* components labels Jan 17, 2023
@nickvergessen
Copy link
Contributor Author

Workaround

:options-filter="() => true"

Can be used to remove the filter.

Optimal solution

But of course it would be nice to have the filter apply after a potential search.

Other solution

Another option would be to change the default filter to not filter when a search is performed if that would work:

		optionsFilter: {
			type: Function,
			default: (_element, index) => index < 5 || this.search !== '',
		},

@PVince81
Copy link
Contributor

duplicate of nextcloud/server#34395 ?

@Pytal

@nickvergessen
Copy link
Contributor Author

nextcloud/server#36152 should be a duplicate of the server ticket.
Can keep one to remember the lib upgrade. But the vue repo ticket needs to stay :)

@Pytal
Copy link
Contributor

Pytal commented Jan 23, 2023

By previous design in #2973 and #2990

Since filtering is handled by the lib component, for NcSelectTags the best option is probably to use the https://vue-select.org/api/props.html#filter prop to truncate to 5 after the filtering logic

Should we do NcMultiselectTags as well @nickvergessen?

@nickvergessen
Copy link
Contributor Author

Should we do NcMultiselectTags

Since it's deprecated we could also skip it and just ask to migrate to the new component.

@Pytal Pytal mentioned this issue Feb 14, 2023
@Pytal
Copy link
Contributor

Pytal commented Feb 14, 2023

Fixed in #3747

@Pytal Pytal self-assigned this Feb 14, 2023
@Pytal Pytal added 3. to review Waiting for reviews and removed 1. to develop Accepted and waiting to be taken care of labels Feb 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews bug Something isn't working feature: select Related to the NcSelect* components
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants