Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

callback not opening a modal #31

Open
bradrice opened this issue May 17, 2018 · 1 comment
Open

callback not opening a modal #31

bradrice opened this issue May 17, 2018 · 1 comment

Comments

@bradrice
Copy link

i can use a click inside of a webform to set an alert in my native component, but for some reason it doesn't open a modal with data. If I put a button on my page under the webview and call the exact same function, it opens and populated the modal.

I can console log the data so it is passing the data properly to the modal from the webview, but for some reason the view doesn't bind to the data. I also noticed when I click the nativescript button to call the modal, that modal goes through the lifecyle events but when calling it from the webview it only gets through the constructor.

Andy idea what I might need to do?

In my parent component with the webview I have this call to the modal component service:

openVocabModal(vocabid){
        console.log('vocab id', vocabid);
        const ctx =
            this.myModalService.createModalContext<Object, string>(
                this.vcRef,
                'Vocab',
                {vocabDef: "some definition", vocabTerm: 'some vocab term'}
            )

            this.myModalService.createModal(VocabModalComponent, ctx)
            .then(res=>{
              console.log(res);  
            });
    }

Here is my call

listenVocabWebViewEvents(){  
        this.oVocabWebViewInterface.on('vocabTapped', (vocabid) => {
            console.log("vocab tapped", vocabid);
            this.openVocabModal(vocabid);
        });
    }
@sebamed
Copy link

sebamed commented Sep 23, 2018

I have the similar issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants