File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3232 (let [validity (fs/get-spec-validity gift-list ::gift-list/name )]
3333 (ui-form
3434 {:onSubmit (fn [_]
35- (if-not (= :valid validity)
36- (comp/transact! this [(fs/mark-complete! {})])
35+ (if (= :valid validity)
3736 (do
3837 (comp/transact! this
3938 [(m.gift-list/create-gift-list
4039 (select-keys gift-list
4140 [::gift-list/id ::gift-list/name ]))])
42- (reset-form! ))))}
41+ (reset-form! ))
42+ (comp/transact! this
43+ [(fs/mark-complete! {})])))}
4344 (ui-form-input
4445 {:placeholder " Birthday 2020"
4546 :onChange (fn [evt]
47+ (when (= :unchecked validity)
48+ (comp/transact! this
49+ [(fs/mark-complete!
50+ {:field ::gift-list/name })]))
4651 (m/set-string! this ::gift-list/name :event evt))
47- :onBlur (fn [_]
48- (comp/transact! this
49- [(fs/mark-complete! {:field ::gift-list/name })]))
5052 :error (when (= :invalid validity)
5153 " Gift list name cannot be blank" )
54+ :autoFocus true
5255 :fluid true
5356 :value name})
5457 (ui-button
You can’t perform that action at this time.
0 commit comments