Open RuFang-21 opened 10 months ago
You can set a prop called key to the SignatureScreen component and update the key every time the dataURL is updated to trigger the re-rendering of the component.
@YanYuanFE I'm facing this only on android after updating some of the libraries including Webview and react-native.
Changing component props for re-rendering did not work for me. The way i solved it is that I assumed 2 modes for it.
the usage is like below:
{(editable || signatureHistory) && (
<Signature
ref={this.sigPadRef}
onOK={this.onSignatureOk}
webStyle={sigPadStyle}
imageType="image/svg+xml"
dataURL={signatureHistory}
/>
)}
The point is that if the dataURL
is present in the first render its all fine but, if its ""
or undefined
and then it gets changed into base64
, it might not render.
@someAndroidDeveloper Hi, This may be the same problem, you can try to solve it by setting key={your dataURL} in the Signature component
"react-native": "0.72.4" "react-native-signature-canvas": "^4.7.1", "react-native-webview": "^13.6.0",
My issues: DataUrl will be string if already save and will be base64 if there is new signature, but sometime it might not showing the previous data. Could you help me on this? Thanks in advanced.