@@ -69,7 +69,8 @@ interface ISelectOption {
6969}
7070
7171export const DEFAULT_GENERIC_ASSAY_OPTIONS_SHOWING : number = 100 ;
72- export const GENERIC_ASSAY_ADD_ALL_VALUES_OPTION = 'generic_assay_add_all_values' ;
72+ export const GENERIC_ASSAY_FREQUENCY_TABLE_OPTION =
73+ 'generic_assay_frequency_table' ;
7374
7475@observer
7576export default class GenericAssaySelection extends React . Component <
@@ -112,11 +113,11 @@ export default class GenericAssaySelection extends React.Component<
112113 const shouldAddFrequencyTable = Boolean (
113114 this . props . onFrequencyTableSubmit &&
114115 this . _selectedGenericAssayEntityIds . includes (
115- GENERIC_ASSAY_ADD_ALL_VALUES_OPTION
116+ GENERIC_ASSAY_FREQUENCY_TABLE_OPTION
116117 )
117118 ) ;
118119 const selectedEntityIds = this . _selectedGenericAssayEntityIds . filter (
119- entityId => entityId !== GENERIC_ASSAY_ADD_ALL_VALUES_OPTION
120+ entityId => entityId !== GENERIC_ASSAY_FREQUENCY_TABLE_OPTION
120121 ) ;
121122 // Generic Assay chart submit (StudyView)
122123 if ( shouldAddFrequencyTable ) {
@@ -172,7 +173,6 @@ export default class GenericAssaySelection extends React.Component<
172173 this . props . onTrackSubmit ( info ) ;
173174 }
174175 }
175- // fail silently
176176 }
177177
178178 @action . bound
@@ -298,7 +298,7 @@ export default class GenericAssaySelection extends React.Component<
298298 let allOptionsInSelectedProfile = this . selectedProfileSupportsFrequencyTable
299299 ? _ . concat (
300300 {
301- value : GENERIC_ASSAY_ADD_ALL_VALUES_OPTION ,
301+ value : GENERIC_ASSAY_FREQUENCY_TABLE_OPTION ,
302302 label : 'Frequency table' ,
303303 } as ISelectOption ,
304304 this . props . genericAssayEntityOptions
@@ -336,7 +336,7 @@ export default class GenericAssaySelection extends React.Component<
336336 if ( option . value === 'select_all_filtered_options' ) {
337337 return true ;
338338 }
339- if ( option . value === GENERIC_ASSAY_ADD_ALL_VALUES_OPTION ) {
339+ if ( option . value === GENERIC_ASSAY_FREQUENCY_TABLE_OPTION ) {
340340 return ! this . _selectedGenericAssayEntityIds . includes (
341341 option . value
342342 ) ;
@@ -377,7 +377,7 @@ export default class GenericAssaySelection extends React.Component<
377377 // filter out select all option
378378 if (
379379 option . value === 'select_all_filtered_options' ||
380- option . value === GENERIC_ASSAY_ADD_ALL_VALUES_OPTION
380+ option . value === GENERIC_ASSAY_FREQUENCY_TABLE_OPTION
381381 ) {
382382 return false ;
383383 }
@@ -393,7 +393,7 @@ export default class GenericAssaySelection extends React.Component<
393393 if ( option . value === 'select_all_filtered_options' ) {
394394 return true ;
395395 }
396- if ( option . value === GENERIC_ASSAY_ADD_ALL_VALUES_OPTION ) {
396+ if ( option . value === GENERIC_ASSAY_FREQUENCY_TABLE_OPTION ) {
397397 return ! this . _selectedGenericAssayEntityIds . includes ( option . value ) ;
398398 }
399399 return (
@@ -411,12 +411,6 @@ export default class GenericAssaySelection extends React.Component<
411411 }
412412 }
413413
414- // TODO: decide whether we need this or not
415- // disabled currently
416- @computed get isSelectedGenericAssayOptionsOverLimit ( ) {
417- return this . _selectedGenericAssayEntityIds . length > 100 ;
418- }
419-
420414 render ( ) {
421415 return (
422416 < div
@@ -434,17 +428,6 @@ export default class GenericAssaySelection extends React.Component<
434428 alignItems : 'center' ,
435429 } }
436430 >
437- { /* {this.isSelectedGenericAssayOptionsOverLimit && (
438- <div className="alert alert-warning">
439- <i
440- className="fa fa-warning"
441- style={{ marginRight: 3 }}
442- />
443- Warning: we don't support adding more than 100
444- options, please make sure your selection has less
445- than 100 options.
446- </div>
447- )} */ }
448431 < div style = { { flex : 1 } } >
449432 < Select
450433 value = { this . selectedProfileOption }
0 commit comments