avoid nested touchable highlight

it seems like the nested touchable highlight is delaying the
recomputation of subscriptions
This commit is contained in:
yenda 2019-11-22 15:22:19 +01:00
parent bf5416b629
commit 0dbcfab2e6
No known key found for this signature in database
GPG Key ID: 0095623C0069DCE6
2 changed files with 4 additions and 4 deletions

View File

@ -10,7 +10,7 @@
[{:keys [on-value-change checked? accessibility-label
disabled? style icon-style]
:or {accessibility-label :checkbox}}]
[react/touchable-highlight
[(if on-value-change react/touchable-highlight react/view)
(merge {:style (merge
styles/wrapper
style)
@ -21,4 +21,4 @@
[icons/tiny-icon
:tiny-icons/tiny-check {:container-style (styles/icon-check-container true)
:color colors/white}]
[react/view {:style (styles/icon-check-container false)}])])
[react/view {:style (styles/icon-check-container false)}])])

View File

@ -103,7 +103,7 @@
{:on-long-press on-long-press}))
(conj item
[react/view {:style (merge style styles/item-checkbox)}
[checkbox/checkbox props]])])
[checkbox/checkbox (dissoc props :on-value-change)]])])
;;TODO DEPRECATED, use status-im.ui.components.list-item.views
(defn list-item-with-radio-button
@ -323,4 +323,4 @@
[react/view (merge styles/list-with-label-wrapper style)
[react/text {:style styles/label}
label]
list])
list])