update setNativeProps()

When updating `points` prop, `setNativeProps` must send a valid `d` prop to `this.root` which is a `<Path>'.
It needs more work, couldn't get it working perfectly. I'm new to RN.
Commit PR for `<Polyline>` as well.
This commit is contained in:
ShaMan123
2018-06-03 13:55:01 +03:00
committed by GitHub
parent aaa1c3d2b7
commit 3a1b139d15
+8 -1
View File
@@ -18,7 +18,14 @@ export default class extends Component {
setNativeProps = (...args) => {
//noinspection JSUnresolvedFunction
this.root.getNativeElement().setNativeProps(...args);
var points = [...args][0].points;
if (points) {
if (Array.isArray(points)) {
points = points.join(",");
}
[...args][0].d = `M${extractPolyPoints(points)}`
}
this.root.setNativeProps(...args);
};
render() {