Search tags is not filtering selected_tags

{{tag-chooser}} is making a call to /tags/filter/search when you gain focus on the input, or use the filter.

The thing is that even if sending an array of selected_tags when no q is given, it will always return the same 5 tags:

which explains why in this screenshot I have only one tag possible when there are a lot more tags possible.

It’s not an extremely important issue, because as soon as you start typing to filter you will receive an appropriate list, still we should probably want to fix it at some point as it’s kind of unexpected and also hurts a little bit tag discoverability.

7 Likes

I committed a fix for this one.

But I notice that the tags section of user preferences still doesn’t work because the “selected tags” list is shared in the controller, but each tag-chooser only sends its own list of selected tags to the server. The controller’s selected tags should be sent by each tag-chooser I think…

5 Likes

ok thanks for the fix, I will check this

2 Likes

Awesome neil, it’s working great.

This should fix the issue you mentioned:

https://github.com/discourse/discourse/commit/fd7308e7f6b59eab9a5b819fc82be248d4c96bdc

6 Likes