Skip to content

Commit

Permalink
Fixed #309
Browse files Browse the repository at this point in the history
  • Loading branch information
Çağatay Çivici authored and Çağatay Çivici committed Feb 13, 2018
1 parent af2ae6e commit 59eca66
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/components/dialog/Dialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ export class Dialog extends Component {
showHeader: true,
positionLeft: -1,
positionTop: -1,
appendTo: null
appendTo: null,
baseZIndex: 0
}

static propTypes = {
Expand Down Expand Up @@ -62,7 +63,8 @@ export class Dialog extends Component {
showHeader: PropTypes.bool,
positionLeft: PropTypes.number,
positionTop: PropTypes.number,
appendTo: PropTypes.object
appendTo: PropTypes.object,
baseZIndex: PropTypes.number
};

constructor(props) {
Expand Down Expand Up @@ -118,9 +120,7 @@ export class Dialog extends Component {

show() {
this.setState({visible: true});

let zIndex = DomHandler.generateZIndex() ;
this.container.style.zIndex = String(zIndex);
this.container.style.zIndex = String(this.props.baseZIndex + DomHandler.generateZIndex());

this.bindGlobalListeners();

Expand Down
7 changes: 7 additions & 0 deletions src/showcase/dialog/DialogDemo.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ export class DialogDemo extends Component {

<Button label="Show" icon="fa-external-link-square" onClick={this.onClick} />
</div>

<DialogDoc></DialogDoc>
</div>
)
Expand Down Expand Up @@ -277,6 +278,12 @@ let footer = <div>
<td>null</td>
<td>DOM element instance where the dialog should be mounted.</td>
</tr>
<tr>
<td>baseZIndex</td>
<td>number</td>
<td>0</td>
<td>Base zIndex value to use in layering.</td>
</tr>
</tbody>
</table>
</div>
Expand Down

0 comments on commit 59eca66

Please sign in to comment.