YanYuanFE / react-native-signature-canvas

:black_nib: React Native Signature Component based WebView Canvas for Android && IOS && expo
MIT License
417 stars 149 forks source link

onOk not triggered when signature pad small but i have another full screen that working fine #356

Open Sureshkumar041 opened 5 months ago

Sureshkumar041 commented 5 months ago

1 . Not working <SignatureScreen onBegin={() => setIsScrollEnabled(false)} bgHeight={100} trimWhitespace={true} scrollable={false} ref={signatureRef} onClear={handleClear} onEmpty={handleEmpty} onEnd={handleEnd} onOK={handleOK} onGetData={handleData} autoClear={false} style={{ maxHeight: height signHeight, overflow: "hidden", }} webviewContainerStyle={{ maxHeight: height signHeight, }} webStyle={webStyle} penColor={colors.colors.black} />

const webStyle = .m-signature-pad { max-Height: ${height} * ${signHeight}, margin:0px !important; overflow: hidden !important; background: white !important; border: none !important; border: 2px dashed ${signColors?.border}; } .m-signature-pad--footer {display: none !important;};

2 Its working fine <SignatureScreen bgHeight={100} trimWhitespace={true} scrollable={false} ref={signatureRef} onEnd={handleEnd} onOK={handleOK} onEmpty={handleEmpty} onClear={handleClear} onGetData={handleData} autoClear={false} descriptionText={text} style={{ maxHeight: height 0.355, backgroundColor: "white", overflow: "hidden", }} webviewContainerStyle={{ maxHeight: height 0.355, backgroundColor: "white", overflow: "hidden", }} webStyle={webStyle} penColor={colors.colors.blue} />

const webStyle = .m-signature-pad { max-Height: ${height} * ${0.355}, overflow: hidden !important; background:${signColors?.card} !important; border: none !important; border: 2px dashed ${signColors?.border}; // border-radius: 12px; // box-shadow: 0px 0px 7px 4px ${signColors?.border}; } .m-signature-pad--footer {display: none !important;};

kenappthings commented 4 months ago

Same issue. onOK is not working for me. It was before but for some reason it is not triggered when I stop drawing.

Sureshkumar041 commented 4 months ago

Now working fine ...?

Same issue. onOK is not working for me. It was before but for some reason it is not triggered when I stop drawing. Now working fine ...?

YanYuanFE commented 4 months ago

@Sureshkumar041 https://github.com/YanYuanFE/react-native-signature-canvas/blob/master/example/sign-app/App.js I just use your code to run this example, onOK work fine