Using actions from another component on search page

Hi! Is it possible to trigger category change action on search page. My case: I have a list of categories at the top
and when I click on them the results at the bottom should change according to the category. I made a connector search-categories, and added a connector class in search-categories.js. But it doesn’t work when I do this way

const tt = require('discourse/components/search-advanced-options');
const Category = require("discourse/models/category");
const Component = require("@ember/component");
const I18n = require("I18n");
const { action } = require("@ember/object");
const { escapeExpression } = require("discourse/lib/utilities");
export default {
    setupComponent(args, component) {
        component.set('today', new Date());
    onChangeSearchTermForCategory(categoryId) {
        if (categoryId) {
            const category = Category.findById(categoryId);
            tt.onChangeCategory && tt.onChangeCategory(category);
            tt.set("searchedTerms.category", category);
        } else {
            tt.onChangeCategory && tt.onChangeCategory(null);
            this.set("searchedTerms.category", null);


Why it doesn’t work and what can be done. My connector hbs file

<div class="custom-categories-wrapper">
    {{conditional-loading-spinner condition=loadingCategories}}
    <div class="nav-pills">
        {{#each categories as |cat|}}
                <a data-slug="{{cat.slug}}" {{on "click" @onChangeSearchTermForCategory}} data-id="{{}}">{{}}</a>

Which plugin outlet is this being added to? is it full-page-search-below-search-info on the advanced search page?