File tree Expand file tree Collapse file tree 1 file changed +3
-12
lines changed
lib/public/components/Filters/LhcFillsFilter Expand file tree Collapse file tree 1 file changed +3
-12
lines changed Original file line number Diff line number Diff line change @@ -24,13 +24,9 @@ export class StableBeamFilterModel extends SelectionModel {
2424 */
2525 constructor ( value = false ) {
2626 super ( { availableOptions : [ { value : true } , { value : false } ] ,
27- defaultSelection : [ { value : false } ] ,
27+ defaultSelection : [ { value : value } ] ,
2828 multiple : false ,
2929 allowEmpty : false } ) ;
30- // Sets filter value to true if
31- if ( value ) {
32- this . setStableBeamsOnly ( value ) ;
33- }
3430 }
3531
3632 /**
@@ -39,8 +35,7 @@ export class StableBeamFilterModel extends SelectionModel {
3935 * @return {boolean } true if filter is stable beams only
4036 */
4137 isStableBeamsOnly ( ) {
42- const selectedOptions = this . selected ;
43- return selectedOptions [ 0 ] === true ;
38+ return this . current ;
4439 }
4540
4641 /**
@@ -50,11 +45,7 @@ export class StableBeamFilterModel extends SelectionModel {
5045 * @return {void }
5146 */
5247 setStableBeamsOnly ( value ) {
53- if ( value ) {
54- this . select ( { value : true } ) ;
55- } else {
56- this . select ( { value : false } ) ;
57- }
48+ this . select ( { value } ) ;
5849 }
5950
6051 /**
You can’t perform that action at this time.
0 commit comments