File tree Expand file tree Collapse file tree 2 files changed +20
-8
lines changed
src/views/portfolio/projects Expand file tree Collapse file tree 2 files changed +20
-8
lines changed Original file line number Diff line number Diff line change 8383 :tags =" collectionTags"
8484 :add-on-key =" addOnKeys"
8585 :placeholder =" $t('message.project_add_collection_tag')"
86+ :autocomplete-items =" tagsAutoCompleteItems"
8687 @tags-changed ="
8788 (newCollectionTags) => (this.collectionTags = newCollectionTags)
8889 "
@@ -315,7 +316,12 @@ export default {
315316 },
316317 computed: {},
317318 watch: {
318- tag: ' searchTags' ,
319+ tag (input ) {
320+ this .searchTags (input);
321+ },
322+ collectionTagTyping (input ) {
323+ this .searchTags (input);
324+ },
319325 },
320326 methods: {
321327 async getACLEnabled () {
@@ -465,14 +471,14 @@ export default {
465471 });
466472 }
467473 },
468- searchTags : function () {
469- if (! this . tag ) {
474+ searchTags : function (input ) {
475+ if (! input ) {
470476 return ;
471477 }
472478
473479 clearTimeout (this .tagsAutoCompleteDebounce );
474480 this .tagsAutoCompleteDebounce = setTimeout (() => {
475- const url = ` ${ this .$api .BASE_URL } /${ this .$api .URL_TAG } ?searchText=${ encodeURIComponent (this . tag )} &pageNumber=1&pageSize=6` ;
481+ const url = ` ${ this .$api .BASE_URL } /${ this .$api .URL_TAG } ?searchText=${ encodeURIComponent (input )} &pageNumber=1&pageSize=6` ;
476482 this .axios .get (url).then ((response ) => {
477483 this .tagsAutoCompleteItems = response .data .map ((tag ) => {
478484 return { text: tag .name };
Original file line number Diff line number Diff line change 8585 :tags =" collectionTags"
8686 :add-on-key =" addOnKeys"
8787 :placeholder =" $t('message.project_add_collection_tag')"
88+ :autocomplete-items =" tagsAutoCompleteItems"
8889 @tags-changed ="
8990 (newCollectionTags) => (this.collectionTags = newCollectionTags)
9091 "
@@ -674,7 +675,12 @@ export default {
674675 });
675676 },
676677 watch: {
677- tag: ' searchTags' ,
678+ tag (input ) {
679+ this .searchTags (input);
680+ },
681+ collectionTagTyping (input ) {
682+ this .searchTags (input);
683+ },
678684 },
679685 methods: {
680686 initializeTags : function () {
@@ -797,14 +803,14 @@ export default {
797803 });
798804 }
799805 },
800- searchTags : function () {
801- if (! this . tag ) {
806+ searchTags : function (input ) {
807+ if (! input ) {
802808 return ;
803809 }
804810
805811 clearTimeout (this .tagsAutoCompleteDebounce );
806812 this .tagsAutoCompleteDebounce = setTimeout (() => {
807- const url = ` ${ this .$api .BASE_URL } /${ this .$api .URL_TAG } ?searchText=${ encodeURIComponent (this . tag )} &pageNumber=1&pageSize=6` ;
813+ const url = ` ${ this .$api .BASE_URL } /${ this .$api .URL_TAG } ?searchText=${ encodeURIComponent (input )} &pageNumber=1&pageSize=6` ;
808814 this .axios .get (url).then ((response ) => {
809815 this .tagsAutoCompleteItems = response .data .map ((tag ) => {
810816 return { text: tag .name };
You can’t perform that action at this time.
0 commit comments