@@ -81,7 +81,7 @@ export type SelectElement = React.ReactElement<SelectProps>;
81
81
82
82
interface State {
83
83
visible : boolean ;
84
- menuWidth : number ;
84
+ optionsListWidth : number ;
85
85
}
86
86
87
87
/**
@@ -437,7 +437,7 @@ class SelectComponent extends React.Component<SelectProps, State> {
437
437
438
438
public state : State = {
439
439
visible : false ,
440
- menuWidth : 0 ,
440
+ optionsListWidth : 0 ,
441
441
} ;
442
442
443
443
private strategy : SelectionStrategy ;
@@ -520,7 +520,7 @@ class SelectComponent extends React.Component<SelectProps, State> {
520
520
private onControlMeasure = ( result : MeasureResult ) : void => {
521
521
const width : number = result [ MEASURED_CONTROL_TAG ] . size . width ;
522
522
523
- this . setState ( { menuWidth : width } ) ;
523
+ this . setState ( { optionsListWidth : width } ) ;
524
524
} ;
525
525
526
526
private getComponentStyle = ( source : StyleType ) : StyleType => {
@@ -537,7 +537,7 @@ class SelectComponent extends React.Component<SelectProps, State> {
537
537
const iconStyles : StyleType = allWithPrefix ( source , 'icon' ) ;
538
538
const textStyles : StyleType = allWithPrefix ( source , 'text' ) ;
539
539
const placeholderStyles : StyleType = allWithPrefix ( source , 'placeholder' ) ;
540
- const menuStyles : StyleType = allWithPrefix ( source , 'menu ' ) ;
540
+ const optionsListStyles : StyleType = allWithPrefix ( source , 'optionsList ' ) ;
541
541
const labelStyle : StyleType = allWithPrefix ( source , 'label' ) ;
542
542
const outlineStyles : StyleType = allWithPrefix ( source , 'outline' ) ;
543
543
@@ -577,11 +577,11 @@ class SelectComponent extends React.Component<SelectProps, State> {
577
577
padding : outlineStyles . outlinePadding ,
578
578
borderRadius : outlineStyles . outlineBorderRadius ,
579
579
} ,
580
- menu : {
581
- maxHeight : menuStyles . menuMaxHeight ,
582
- borderRadius : menuStyles . menuBorderRadius ,
583
- borderColor : menuStyles . menuBorderColor ,
584
- borderWidth : menuStyles . menuBorderWidth ,
580
+ optionsList : {
581
+ maxHeight : optionsListStyles . optionsListMaxHeight ,
582
+ borderRadius : optionsListStyles . optionsListBorderRadius ,
583
+ borderColor : optionsListStyles . optionsListBorderColor ,
584
+ borderWidth : optionsListStyles . optionsListBorderWidth ,
585
585
} ,
586
586
label : {
587
587
color : labelStyle . labelColor ,
@@ -641,16 +641,16 @@ class SelectComponent extends React.Component<SelectProps, State> {
641
641
) ;
642
642
} ;
643
643
644
- private renderMenuElement = ( style : StyleType ) : SelectOptionsListElement => {
644
+ private renderOptionsListElement = ( style : StyleType ) : SelectOptionsListElement => {
645
645
const { appearance, selectedOption, ...restProps } = this . props ;
646
- const additionalMenuStyle : StyleType = { width : this . state . menuWidth } ;
646
+ const additionalOptionsListStyle : StyleType = { width : this . state . optionsListWidth } ;
647
647
648
648
return (
649
649
< SelectOptionsList
650
650
{ ...restProps }
651
651
strategy = { this . strategy }
652
652
key = { 0 }
653
- style = { [ styles . menu , style , additionalMenuStyle ] }
653
+ style = { [ styles . optionsList , style , additionalOptionsListStyle ] }
654
654
bounces = { false }
655
655
onSelect = { this . onItemSelect }
656
656
/>
@@ -695,27 +695,27 @@ class SelectComponent extends React.Component<SelectProps, State> {
695
695
const { label } = this . props ;
696
696
697
697
return [
698
- this . renderMenuElement ( style . menu ) ,
698
+ this . renderOptionsListElement ( style . optionsList ) ,
699
699
isValidString ( label ) && this . renderLabelElement ( style . label ) ,
700
700
this . renderControlElement ( ) ,
701
701
] ;
702
702
} ;
703
703
704
704
public render ( ) : SelectElement {
705
705
const { themedStyle, style } = this . props ;
706
- const { visible, menuWidth } = this . state ;
706
+ const { visible, optionsListWidth } = this . state ;
707
707
const componentStyle : StyleType = this . getComponentStyle ( themedStyle ) ;
708
- const [ menuElement , labelElement , controlElement ] = this . renderComponentChildren ( componentStyle ) ;
709
- const additionalMenuStyle : StyleType = { maxWidth : menuWidth } ;
708
+ const [ optionsListElement , labelElement , controlElement ] = this . renderComponentChildren ( componentStyle ) ;
709
+ const additionalOptionsListStyle : StyleType = { maxWidth : optionsListWidth } ;
710
710
711
711
return (
712
712
< View style = { style } >
713
713
{ labelElement }
714
714
< View style = { [ styles . outline , componentStyle . outline ] } >
715
715
< Popover
716
716
visible = { visible }
717
- content = { menuElement }
718
- style = { additionalMenuStyle }
717
+ content = { optionsListElement }
718
+ style = { additionalOptionsListStyle }
719
719
indicatorStyle = { styles . indicator }
720
720
onBackdropPress = { this . setVisibility } >
721
721
{ controlElement }
@@ -741,7 +741,7 @@ const styles = StyleSheet.create({
741
741
width : 0 ,
742
742
height : 6 ,
743
743
} ,
744
- menu : {
744
+ optionsList : {
745
745
flexGrow : 0 ,
746
746
} ,
747
747
outlineContainer : {
0 commit comments