File tree Expand file tree Collapse file tree 2 files changed +1
-5
lines changed Expand file tree Collapse file tree 2 files changed +1
-5
lines changed Original file line number Diff line number Diff line change @@ -1309,8 +1309,6 @@ export class CodeSnippetDisplay extends React.Component<
13091309 filterTags : string [ ] ,
13101310 selectedLangTags : string [ ]
13111311 ) : void => {
1312- // TODO: when language tag is selected, only display tags that have that tag AND the snippet tags selected.
1313- // filter with search
13141312 let matchIndices : number [ ] [ ] = [ ] ;
13151313 const matchResults : StringExt . IMatchResult [ ] = [ ] ;
13161314 let filteredSnippets = this . props . codeSnippets ;
@@ -1356,9 +1354,6 @@ export class CodeSnippetDisplay extends React.Component<
13561354 const newMatchIndices = matchIndices . slice ( ) ;
13571355 filteredSnippets = filteredSnippets . filter ( ( codeSnippet , id ) => {
13581356 return filterTags . some ( ( tag ) => {
1359- // check if filterTags has a language tag or pass in selectedLang tags
1360- // then check if codeSnippet.language matches that lang. If it matches then
1361- // filter by the rest of the selected snippet tags.
13621357 if ( codeSnippet . tags ) {
13631358 if ( selectedLangTags . length !== 0 ) {
13641359 // lang tags selected
Original file line number Diff line number Diff line change @@ -100,6 +100,7 @@ export class FilterTools extends React.Component<
100100 ! this . props . languageTags . includes ( tag )
101101 ) {
102102 if ( selectedLanguageTags . length !== 0 ) {
103+ // if languages are selected, only display snippet tags that have snippets in those languages
103104 const langsMatch = this . props . tagDictionary
104105 . get ( tag )
105106 . some ( ( r ) => selectedLanguageTags . includes ( r ) ) ;
You can’t perform that action at this time.
0 commit comments