Skip to content

Commit

Permalink
Generate super call to BaseViewManagerDelegate if delegate has no props
Browse files Browse the repository at this point in the history
Summary: This diff adds a super call to `BaseViewManagerDelegate` if the current delegate doesn't have any props. We still want to set base view props, so we need `BaseViewManagerDelegate` to take care of this.

Reviewed By: rickhanlonii

Differential Revision: D16806648

fbshipit-source-id: 61963f2211cc7b2e7f5822c48bb0a7f50d909221
  • Loading branch information
makovkastar authored and facebook-github-bot committed Aug 15, 2019
1 parent 0cf1c6d commit a206e91
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ function generatePropCasesString(
componentName: string,
) {
if (component.props.length === 0) {
return '// No props';
return 'super.setProperty(view, propName, value);';
}

const cases = component.props
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ public class CommandNativeComponentManagerDelegate<T extends View, U extends Bas
}
@Override
public void setProperty(T view, String propName, @Nullable Object value) {
// No props
super.setProperty(view, propName, value);
}
public void receiveCommand(CommandNativeComponentManagerInterface<T> viewManager, T view, String commandName, ReadableArray args) {
Expand Down Expand Up @@ -335,7 +335,7 @@ public class InterfaceOnlyComponentManagerDelegate<T extends View, U extends Bas
}
@Override
public void setProperty(T view, String propName, @Nullable Object value) {
// No props
super.setProperty(view, propName, value);
}
}
",
Expand Down Expand Up @@ -541,7 +541,7 @@ public class NoPropsNoEventsComponentManagerDelegate<T extends View, U extends B
}
@Override
public void setProperty(T view, String propName, @Nullable Object value) {
// No props
super.setProperty(view, propName, value);
}
}
",
Expand Down

0 comments on commit a206e91

Please sign in to comment.