This repository was archived by the owner on Mar 24, 2023. It is now read-only.
File tree 4 files changed +10
-5
lines changed
4 files changed +10
-5
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " @replicatedhq/ship-init" ,
3
- "version" : " 1.6.6 " ,
3
+ "version" : " 1.6.7 " ,
4
4
"description" : " Shared component that contains the Ship Init app" ,
5
5
"author" : " Replicated, Inc." ,
6
6
"license" : " Apache-2.0" ,
Original file line number Diff line number Diff line change @@ -145,6 +145,8 @@ export default class ConfigOnly extends React.Component {
145
145
const { configErrors } = this . props ;
146
146
if ( ! configErrors . length ) return ;
147
147
configErrors . map ( ( err ) => {
148
+ // TODO: Refactor to pass errors down instead of manipulating
149
+ // the DOM
148
150
const el = document . getElementById ( `${ err . fieldName } -errblock` ) ;
149
151
el . innerHTML = err . message ;
150
152
el . classList . add ( "visible" ) ;
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ import isEmpty from "lodash/isEmpty";
7
7
import { ConfigService } from "../../services/ConfigService" ;
8
8
9
9
import ConfigInput from "./ConfigInput" ;
10
- import ConfigTextara from "./ConfigTextarea" ;
10
+ import ConfixTextarea from "./ConfigTextarea" ;
11
11
import ConfigSelectOne from "./ConfigSelectOne" ;
12
12
import ConfigItemTitle from "./ConfigItemTitle" ;
13
13
import ConfigCheckbox from "./ConfigCheckbox" ;
@@ -37,7 +37,7 @@ export default class ConfigGroup extends React.Component {
37
37
) ;
38
38
case "textarea" :
39
39
return (
40
- < ConfigTextara
40
+ < ConfixTextarea
41
41
key = { `${ i } -${ item . name } ` }
42
42
handleOnChange = { this . handleItemChange }
43
43
hidden = { item . hidden }
Original file line number Diff line number Diff line change @@ -31,11 +31,14 @@ export default class ConfigInput extends React.Component {
31
31
this . setState ( { inputVal : this . props . value } ) ;
32
32
}
33
33
}
34
-
34
+ // p1-2019-06-27
35
+ // Fields that are required sometimes don't have a title associated with them.
36
+ // Use title -OR- required prop to render <ConfigItemTitle> to make sure error
37
+ // elements are rendered.
35
38
render ( ) {
36
39
return (
37
40
< div className = { `field field-type-text ${ this . props . hidden ? "hidden" : "u-marginTop--15" } ` } >
38
- { this . props . title !== "" ?
41
+ { this . props . title !== "" || this . props . required ?
39
42
< ConfigItemTitle
40
43
title = { this . props . title }
41
44
recommended = { this . props . recommended }
You can’t perform that action at this time.
0 commit comments