Pearson-Higher-Ed / modal

https://pearson-higher-ed.github.io/modal/#/
MIT License
0 stars 1 forks source link

Pearson modal not scrollable ? #35

Open itjayaprakash opened 5 years ago

itjayaprakash commented 5 years ago

Hi Team,

I have created Pearson Modal issue please check Demo

when i click save button modal dialog is moving up both desktop and mobile but when Resize the browser it's working fine.

i set the state into this.setState({ firstModalIsShown: false }) because example inside modal i need to set the validation. after full fill the validation then only i set this.setState({ firstModalIsShown: true})

how to fix this issue.

sample code here https://codesandbox.io/s/21w4xp64x0 Sample Code Thanks.

antelopeb commented 5 years ago

@itjayaprakash -- can you please provide code samples to repeat? Including on the other ticket you have open here, too.

PrasannaBrabourame commented 5 years ago

@itjayaprakash -- After clicking on save button you should change the state. It will work fine.

itjayaprakash commented 5 years ago

@itjayaprakash -- After clicking on save button you should change the state. It will work fine.

Hi Prasanna

i set the state in Save Button this.setState({ firstModalIsShown: false }) why dialog is moving up ? do you have any idea about this issue.

itjayaprakash commented 5 years ago

@itjayaprakash -- can you please provide code samples to repeat? Including on the other ticket you have open here, too.

Hi Greg,

sure i share the code into codesandbox Here please check

PrasannaBrabourame commented 5 years ago

@itjayaprakash -- on your demo itself it is working fine.

itjayaprakash commented 5 years ago

@itjayaprakash -- on your demo itself it is working fine.

no it's not working i already raised another bug also Here i attached screenshot also once again please check

Here

please review my code here https://codesandbox.io/s/21w4xp64x0

PrasannaBrabourame commented 5 years ago

@itjayaprakash -- after clicking on the model save you should change the state to false. If you are calling an api means it will not wait until your response received. if it is any error occured on the api means you should show them with some alert like "An Error Occured"

antelopeb commented 5 years ago

I'm going to agree with Prasanna here. I'm not sure why clicking on the "save" button would set the firstModalIsShown to true. This should be false, and if you want to track the difference between save and cancel you should have a callback for each one. The error you are getting seems to be something to do with the modal trying to display itself twice, which is why it's getting weird.

itjayaprakash commented 5 years ago

I'm going to agree with Prasanna here. I'm not sure why clicking on the "save" button would set the firstModalIsShown to true. This should be false, and if you want to track the difference between save and cancel you should have a callback for each one. The error you are getting seems to be something to do with the modal trying to display itself twice, which is why it's getting weird.

Hi Greg,

i shared my sample code with can you plesae check. Here in that sample without enter your name you can save. and see.

now i am not set state firstModalIsShown to true.