Fix updating stack config props. (#231)

When some of config props change or new header items are added we need to perform a header update. This diff adds logic to trigger updating header props when that happens.
This commit is contained in:
Krzysztof Magiera
2019-11-22 13:03:11 +01:00
committed by GitHub
parent 0a2336d005
commit 2c5f95cea6
5 changed files with 53 additions and 5 deletions

View File

@@ -52,6 +52,12 @@ public class ScreenStackHeaderConfigViewManager extends ViewGroupManager<ScreenS
return true;
}
@Override
protected void onAfterUpdateTransaction(ScreenStackHeaderConfig parent) {
super.onAfterUpdateTransaction(parent);
parent.onUpdate();
}
@ReactProp(name = "title")
public void setTitle(ScreenStackHeaderConfig config, String title) {
config.setTitle(title);