Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modal: Flickering when size is set to Large or small #1675

Closed
da-moon opened this issue May 13, 2017 · 0 comments
Closed

Modal: Flickering when size is set to Large or small #1675

da-moon opened this issue May 13, 2017 · 0 comments

Comments

@da-moon
Copy link

da-moon commented May 13, 2017

I am expereincing an issue when I am using Modal Component with Meteor. For some reason,Modal would keep "flickering", unless the Modal size is set to full screen.

Steps

Here is the code :

import React, { Component } from 'react';
import { Card, Icon, Image , Item,Button, Divider, Header, Container, Modal} from 'semantic-ui-react'
export default class someComponent extends Component {
    constructor(props)
    {
      super(props);
      this.state= {
        items :[
          { 
              image: {size:'tiny',src:"https://semantic-ui.com/images/wireframe/image.png"}, header: "Project Falcome", description:this.renderComponents("description"),extra:this.renderComponents("button","id1")
          },
           { 
              image: {size:'tiny',src:"https://semantic-ui.com/images/wireframe/image.png"}, header: "Project Domino", description:this.renderComponents("description"),extra:this.renderComponents("button","id2")
          },
           { 
              image: {size:'tiny',src:"https://semantic-ui.com/images/wireframe/image.png"}, header: "Project Bengali tiger", description:this.renderComponents("description"),extra:this.renderComponents("button","id3")
          },
           { 
              image: {size:'tiny',src:"https://semantic-ui.com/images/wireframe/image.png"}, header: "Project Outback", description:this.renderComponents("description"),extra:this.renderComponents("button","id4")
          },
        ],
        open: false,
        dimmer:"blurring",
      };
       this.renderComponents = this.renderComponents.bind(this);
      this.showModal = this.showModal.bind(this);
      this.closeModal=this.closeModal.bind(this);
    }
    showModal(e,_id){
      e.preventDefault();
     this.setState({ open: true })
    }
    closeModal(){
     this.setState({ open: false })
    }
    
    renderComponents  (type,_id)
    {
      if( type === "description")
        return (<Image src='https://semantic-ui.com/images/wireframe/short-paragraph.png' />);
      if (type==="button")
          return (<div>
          <Divider/>
          <Button primary floated='left' onClick={(e)=>{this.showModal(e,_id)}}>
            Explore
            <Icon name='right chevron' />
          </Button></div>);
    }
    
        
    render()
    {
      return( <div>
          <Item.Group divided items = {this.state.items}/>
          <Modal size='large' dimmer={this.state.dimmer} open={this.state.open} oncloseModal={this.closeModal}>
                    <Modal.Header>Select a Photo</Modal.Header>
                      <Modal.Content image>
                        <Image wrapped size='medium' src='http://semantic-ui.com/images/avatar2/large/kristy.png' />
                        <Modal.Description>
                          <Header>Default Profile Image</Header>
                          <p>We have found the following gravatar image associated with your e-mail address.</p>
                          <p>Is it okay to use this photo?</p>
                        </Modal.Description>
                      </Modal.Content>
                    </Modal>
          </div>
      );
    }
}

Expected Result

I was expecting to get something like this :
https://react.semantic-ui.com/modules/modal#modal-example-size

Actual Result

Here is how it actually looks
https://apperture-damoona.c9users.io/artist-dashboard

Version

0.68.3

@da-moon da-moon changed the title Modal: Modal: Flickering when size is set to Large or small May 13, 2017
@da-moon da-moon closed this as completed May 13, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant