git.iko.soy/rowtype-yoga/ry-blocks
on main help sign in
Let's go?
commitbfed44c245f495003ccf05291c46318e20ab83a3 authorMark Eibes <mark.eibes@gmail.com> dateSat 19 Mar 2022, 20:30 (5 years ago) parent2f39b21
1 file changed+13−12
src/Yoga/Block/Atom/Input/View.purs+13−12
src/Yoga/Block/Atom/Input/View.purs+13−12
@@ -59,7 +59,7 @@ mkLeftIcon icon =
5959
6060rawComponent ∷ ∀ p. ReactComponent (Record p)
6161rawComponent =
62− mkForwardRefComponent "InputContainer" do
62+ mkForwardRefComponent "YogaInput" do
6363 \(props ∷ { | PropsOptional }) propsRef -> React.do
6464 hasFocus /\ setHasFocus <- useState' false
6565 inputBackupRef ∷ NodeRef <- useRef null
@@ -136,17 +136,18 @@ rawComponent =
136136 let
137137 inputProps ∷ { | PropsOptional }
138138 inputProps =
139− props
140− { onFocus = cast (composeHandler onFocus props.onFocus)
141− , onBlur = cast (composeHandler onBlur props.onBlur)
142− , onChange = cast (composeHandler onChange props.onChange)
143− , placeholder = maybePlaceholder # maybeToOp
144− , _aria =
145− if props.label # opToMaybe # isJust then
146− cast (aria # Object.insert "labelledby" labelId)
147− else
148− cast (aria)
149− }
139+ ( props
140+ { onFocus = cast (composeHandler onFocus props.onFocus)
141+ , onBlur = cast (composeHandler onBlur props.onBlur)
142+ , onChange = cast (composeHandler onChange props.onChange)
143+ , placeholder = maybePlaceholder # maybeToOp
144+ , _aria =
145+ if props.label # opToMaybe # isJust then
146+ cast (aria # Object.insert "labelledby" labelId)
147+ else
148+ cast (aria)
149+ } # deleteUndefineds
150+ )
150151 theInput =
151152 HTMLInput.componentOptional
152153 </>