I am using the dropdown menu upload dialog box https://react-bootstrap.imtqy.com/components.html#btn-dropdowns . pullRight and pullLeft allows pullLeft to align the position of the menu.
I do not know the width of the menu items initially. I need to calculate the runtime and conditionally align the dropdowns (pass the pullLeft / pullRight to DropdownButton ). Children ( MenuItem ) are not visible when dropping loads, only when I press the button I get the height.
My question is, do I need to calculate the click height and redisplay the entire DropdownButton component? Any better way to pass reliance on the DropdownButton component without rendering?
<DropdownButton buttonClassName={buttonAttrs.className} pullLeft onClick={this.callToggle} bsStyle={(metadata.displayStyle === 'button' ? 'button' : 'link' )} noCaret title={title} key={"0"} id={"test"} > {this.renderChildren().map((child, index) => { return (<MenuItem eventKey={index}>{child}</MenuItem>) })} </DropdownButton> : <button {...buttonAttrs} ref="button">
twitter-bootstrap reactjs react-native react-bootstrap
user2814819
source share