FIX: Too many requests from single search (#318)

This commit is contained in:
Keegan George 2023-11-27 17:51:42 -08:00 committed by GitHub
parent c7665e891b
commit 02f7b368a1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 2 deletions

View File

@ -3,7 +3,6 @@ import { tracked } from "@glimmer/tracking";
import { on } from "@ember/modifier"; import { on } from "@ember/modifier";
import { action } from "@ember/object"; import { action } from "@ember/object";
import didInsert from "@ember/render-modifiers/modifiers/did-insert"; import didInsert from "@ember/render-modifiers/modifiers/did-insert";
import didUpdate from "@ember/render-modifiers/modifiers/did-update";
import { inject as service } from "@ember/service"; import { inject as service } from "@ember/service";
import DToggleSwitch from "discourse/components/d-toggle-switch"; import DToggleSwitch from "discourse/components/d-toggle-switch";
import { SEARCH_TYPE_DEFAULT } from "discourse/controllers/full-page-search"; import { SEARCH_TYPE_DEFAULT } from "discourse/controllers/full-page-search";
@ -149,7 +148,7 @@ export default class SemanticSearch extends Component {
<template> <template>
{{#if this.searchEnabled}} {{#if this.searchEnabled}}
<div class="semantic-search__container search-results" role="region"> <div class="semantic-search__container search-results" role="region">
<div class="semantic-search__results" {{didInsert this.handleSearch}} {{didUpdate this.handleSearch this.searchTerm}}> <div class="semantic-search__results" {{didInsert this.handleSearch}}>
<div <div
class="semantic-search__searching class="semantic-search__searching
{{if this.searching 'in-progress'}}" {{if this.searching 'in-progress'}}"