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

Message of type warning, success and error does not show up inside Form. #1357

Closed
kingdido999 opened this issue Feb 21, 2017 · 5 comments
Closed

Comments

@kingdido999
Copy link

kingdido999 commented Feb 21, 2017

I noticed that Message of type warning, success and error won't be displayed inside a Form according to the Semantic UI css declaration:

.ui.form .error.message, .ui.form .success.message, .ui.form .warning.message {
    display: none;
}

Is there any specific reason of excluding these three types of messages to be shown inside a form while allowing other message types/synonyms? I do see them being mentioned as form states in the Form docs though.

Steps

  1. Create a Form.
  2. Inside the Form, create three individual Message with prop warning, success and error.

Expected Result

It should display messages mentioned above.

Actual Result

It does not show any message.

Version

0.65.0

Testcase

http://codepen.io/kingdido999/pen/ggVpQY?editors=1010

@levithomason
Copy link
Member

The CSS is intentional so that the form state shows/hides message children of the same state:

http://react.semantic-ui.com/collections/form#success
http://react.semantic-ui.com/collections/form#error
http://react.semantic-ui.com/collections/form#warning

@TimoRuetten
Copy link

If someone else will have this problem: Setting the visible prop to your Component will solve it.

@medinajuanpablo-dev
Copy link

I spent a ton of time discovering this, as it's not specified anywhere in the Message docs.

I just tried to display a message for loading-success-error of the initial population of a form. That data is fetched from server, so I just wanted to give the user some feedback. The message didn't display there, but it did in the rest of my app, so I obviously thought it was not the Message's problem.

Well happens that Message doesn't behave the same within a Form and it's not specified anywhere within the Message docs. Please be kind of specifing this "behavior change" in the component's doc, because one may understandably assume it behaves the same everywhere.

Thanks!

@levithomason
Copy link
Member

@ydsood
Copy link

ydsood commented Apr 24, 2020

@levithomason how would the scenario, where some fields have errors and some fields have warnings be handled?

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

5 participants