Semantic-ui-react: Message of type warning, success and error does not show up inside Form.

Created on 21 Feb 2017  路  5Comments  路  Source: Semantic-Org/Semantic-UI-React

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

Most helpful comment

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

All 5 comments

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

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 how would the scenario, where some fields have errors and some fields have warnings be handled?

Was this page helpful?
0 / 5 - 0 ratings