mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-01-10 04:52:40 +00:00
Fix crash on metaData tab
Hiding the `moveBrew` etc. properties when `this.state.showMoveArrows == false` means when the `metaData` tab turns off the arrows it crashes because now some functions are undefined. Just using a whole separate property to avoid conflict.
This commit is contained in:
@@ -380,7 +380,7 @@ const VaultPage = (props)=>{
|
|||||||
<link href='/themes/V3/5ePHB/style.css' rel='stylesheet' />
|
<link href='/themes/V3/5ePHB/style.css' rel='stylesheet' />
|
||||||
{renderNavItems()}
|
{renderNavItems()}
|
||||||
<div className='content'>
|
<div className='content'>
|
||||||
<SplitPane hideMoveArrows>
|
<SplitPane showDividerButtons={false}>
|
||||||
<div className='form dataGroup'>{renderForm()}</div>
|
<div className='form dataGroup'>{renderForm()}</div>
|
||||||
|
|
||||||
<div className='resultsContainer dataGroup'>
|
<div className='resultsContainer dataGroup'>
|
||||||
|
|||||||
@@ -7,8 +7,9 @@ const SplitPane = createClass({
|
|||||||
displayName : 'SplitPane',
|
displayName : 'SplitPane',
|
||||||
getDefaultProps : function() {
|
getDefaultProps : function() {
|
||||||
return {
|
return {
|
||||||
storageKey : 'naturalcrit-pane-split',
|
storageKey : 'naturalcrit-pane-split',
|
||||||
onDragFinish : function(){} //fires when dragging
|
onDragFinish : function(){}, //fires when dragging
|
||||||
|
showDividerButtons : true
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -18,8 +19,7 @@ const SplitPane = createClass({
|
|||||||
windowWidth : 0,
|
windowWidth : 0,
|
||||||
isDragging : false,
|
isDragging : false,
|
||||||
moveSource : false,
|
moveSource : false,
|
||||||
moveBrew : false,
|
moveBrew : false
|
||||||
showMoveArrows : !this.props.hideMoveArrows,
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -142,7 +142,7 @@ const SplitPane = createClass({
|
|||||||
width={this.state.currentDividerPos}
|
width={this.state.currentDividerPos}
|
||||||
>
|
>
|
||||||
{React.cloneElement(this.props.children[0], {
|
{React.cloneElement(this.props.children[0], {
|
||||||
...(this.state.showMoveArrows && {
|
...(this.props.showDividerButtons && {
|
||||||
moveBrew: this.state.moveBrew,
|
moveBrew: this.state.moveBrew,
|
||||||
moveSource: this.state.moveSource,
|
moveSource: this.state.moveSource,
|
||||||
setMoveArrows: this.setMoveArrows,
|
setMoveArrows: this.setMoveArrows,
|
||||||
|
|||||||
Reference in New Issue
Block a user