Reset pointerEvents on null value

Summary: This was ignored before.

Reviewed By: javache

Differential Revision: D4495022

fbshipit-source-id: 9003fa109ef0274b2d1d023d9839a7027cbf522a
This commit is contained in:
Andy Street 2017-02-01 11:04:44 -08:00 committed by Facebook Github Bot
parent 76e3d45c34
commit 866ac17331

View File

@ -95,7 +95,9 @@ public class ReactViewManager extends ViewGroupManager<ReactViewGroup> {
@ReactProp(name = ViewProps.POINTER_EVENTS)
public void setPointerEvents(ReactViewGroup view, @Nullable String pointerEventsStr) {
if (pointerEventsStr != null) {
if (pointerEventsStr == null) {
view.setPointerEvents(PointerEvents.AUTO);
} else {
PointerEvents pointerEvents =
PointerEvents.valueOf(pointerEventsStr.toUpperCase(Locale.US).replace("-", "_"));
view.setPointerEvents(pointerEvents);