mirror of
https://github.com/discourse/discourse.git
synced 2024-11-22 11:15:05 +08:00
FIX: simplifies updating searchedTerms from connectors (#10674)
This commit is contained in:
parent
324aa3eb61
commit
53e281a3fd
|
@ -412,6 +412,12 @@ export default Component.extend({
|
|||
this.updateInRegex(REGEXP_SPECIAL_IN_TITLE_MATCH, "title");
|
||||
},
|
||||
|
||||
@action
|
||||
onChangeSearchedTermField(path, updateFnName, value) {
|
||||
this.set(`searchedTerms.${path}`, value);
|
||||
this[updateFnName]();
|
||||
},
|
||||
|
||||
_updateSearchTermForTags() {
|
||||
const match = this.filterBlocks(REGEXP_TAGS_PREFIX);
|
||||
const tagFilter = this.get("searchedTerms.tags");
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{{plugin-outlet name="advanced-search-options-above" args=(hash searchedTerms=searchedTerms) tagName=""}}
|
||||
{{plugin-outlet name="advanced-search-options-above" args=(hash searchedTerms=searchedTerms onChangeSearchedTermField=onChangeSearchedTermField) tagName=""}}
|
||||
|
||||
<div class="container advanced-search-posted-by-group">
|
||||
<div class="control-group pull-left">
|
||||
|
@ -162,4 +162,4 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
{{plugin-outlet name="advanced-search-options-below" args=(hash searchedTerms=searchedTerms) tagName=""}}
|
||||
{{plugin-outlet name="advanced-search-options-below" args=(hash searchedTerms=searchedTerms onChangeSearchedTermField=onChangeSearchedTermField) tagName=""}}
|
||||
|
|
Loading…
Reference in New Issue
Block a user