shiv19 / nativescript-cfalert-dialog

CFAlertDialog Wrapper for NativeScript
Apache License 2.0
42 stars 21 forks source link

There are error in callbacks function click button #1

Closed edorozco closed 7 years ago

edorozco commented 7 years ago

Clicks button on dialogStyle: CFAlertStyle.BOTTOM_SHEET, never return your repective callback click button, always return the last callback button that was setup.

{
    "text": "Okay",
    "buttonStyle": CFAlertActionStyle.POSITIVE,
    "buttonAlignment": CFAlertActionAlignment.JUSTIFIED,
    "onClick": function(response) {
        console.log(response);
    }
}, {
    "text": "Nope",
    "buttonStyle": CFAlertActionStyle.NEGATIVE,
    "buttonAlignment": CFAlertActionAlignment.JUSTIFIED,
    "onClick": function(response) {
                // always return here, because is the last button in array
        console.log(response);
    }
}

Ex. if I tapping OK, enter into callback of Nope Function.

shiv19 commented 7 years ago

I see. Will take a look into it today. Thanks for finding the bug. @edorozco

shiv19 commented 7 years ago

@edorozco I have confirmed the issue. Will fix it by the end of the day

edorozco commented 7 years ago

Thanks dude.! Im wait for it

shiv19 commented 7 years ago

@edorozco Issue resolved in version 1.0.5 😄 enjoy 👍

edorozco commented 7 years ago

Thanks dude, nice job.. its works ok