File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ type alias Config =
8
8
, dense : Bool
9
9
, name : String
10
10
, collapseNestedObjects : Bool
11
+ , showErrorIcon : Bool
11
12
}
12
13
13
14
@@ -22,12 +23,13 @@ defaultConfig =
22
23
, dense = True
23
24
, name = " "
24
25
, collapseNestedObjects = False
26
+ , showErrorIcon = True
25
27
}
26
28
27
29
28
30
decoder : Decoder Config
29
31
decoder =
30
- Decode . map4 Config
32
+ Decode . map5 Config
31
33
(( field " textFieldStyle" <|
32
34
Decode . andThen
33
35
( \ x ->
@@ -49,3 +51,4 @@ decoder =
49
51
( field " dense" bool |> maybe |> Decode . map ( Maybe . withDefault True ))
50
52
( field " name" string |> maybe |> Decode . map ( Maybe . withDefault " " ))
51
53
( field " collapseNestedObjects" bool |> maybe |> Decode . map ( Maybe . withDefault False ))
54
+ ( field " showErrorIcon" bool |> maybe |> Decode . map ( Maybe . withDefault True ))
Original file line number Diff line number Diff line change @@ -94,8 +94,8 @@ view model schema isJson isRequired isDisabled path =
94
94
else
95
95
ToggleShowPassword |> eye |> Just
96
96
97
- else if hasError then
98
- errorIcon |> Just
97
+ else if hasError && model . config . showErrorIcon then
98
+ Just errorIcon
99
99
100
100
else if not isRequired && editedValue /= " " && not actuallyDisabled then
101
101
DeleteProperty path |> deleteIcon |> Just
You can’t perform that action at this time.
0 commit comments