Skip to content

Commit

Permalink
Category filter as default [feenkcom/gtoolkit#3983]
Browse files Browse the repository at this point in the history
  • Loading branch information
JurajKubelka committed Oct 21, 2024
1 parent e0e6ef9 commit 7c1d746
Showing 1 changed file with 9 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
Extension { #name : #GtSearchMethodCategoryFilter }

{ #category : #'*GToolkit-Pharo-Coder-UI' }
GtSearchMethodCategoryFilter >> filterDescriptor2For: aMethodsCoder [
^ (super filterDescriptor2For: aMethodsCoder)
ifNotNil: [ :aFilterModel |
aFilterModel selectedItem: (category ifNil: [ AllProtocol gtDefaultName ]) ]
]

{ #category : #'*GToolkit-Pharo-Coder-UI' }
GtSearchMethodCategoryFilter class >> filterDescriptor2For: aMethodsCoder [
^ GtFilterShortListModel new
creator: [ :anItem | anItem ifSome: [ :aName | self forCategory: aName ] ];
named: self filterName;
order: 15;
items: (GtPharoStreamingMethodsCoderPossibleCategoriesBuilder new methodsCoder: aMethodsCoder);
selectFirstItem
selectFirstItem;
beDefault
]

{ #category : #'*GToolkit-Pharo-Coder-UI' }
GtSearchMethodCategoryFilter >> filterDescriptor2For: aMethodsCoder [
^ (super filterDescriptor2For: aMethodsCoder)
ifNotNil: [ :aFilterModel |
aFilterModel selectedItem: (category ifNil: [ AllProtocol gtDefaultName ]) ]
]

{ #category : #'*GToolkit-Pharo-Coder-UI' }
Expand Down

0 comments on commit 7c1d746

Please sign in to comment.