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

ConfirmPopup : useConfirm define target is missing in ts #859

Closed
Zaaaoo opened this issue Jan 13, 2021 · 2 comments
Closed

ConfirmPopup : useConfirm define target is missing in ts #859

Zaaaoo opened this issue Jan 13, 2021 · 2 comments
Assignees
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@Zaaaoo
Copy link

Zaaaoo commented Jan 13, 2021

In my setup :

const cancelCreate = (event: any): void => {
  confirm.require({
    message: 'Etes vous certain de vouloir annuler la création ?',
    icon: 'pi pi-exclamation-triangle',
    rejectLabel: 'Non',
    acceptLabel: 'Oui',
    accept: () => {
      router.push('accueil')
    },
    reject: () => {
      console.log('Reject')
    },
  })
}

It would be nice to add the possibility to define the target when we use useConfirm()
Without target we cannot use this component
Unless we can define it on the Component? <ConfirmPopup></ConfirmPopup>

The actual useConfirm don't have target properties :
useconfirm.d.ts :

export declare function useConfirm(): { 
    require(args:{ 
        message?: string;
        group?: string;
        icon?: string;
        header?: string;
        accept?: Function;
        reject?: Function;
        acceptLabel?: string;
        rejectLabel?: string;
        acceptIcon?: string;
        rejectIcon?: string;
        blockScroll?: boolean;
        acceptClass?: string;
        rejectClass?: string;
    }): void 

    close(): void 
}

image

@Zaaaoo Zaaaoo changed the title useConfirm define target ConfirmPopup : useConfirm define target Jan 13, 2021
@cagataycivici cagataycivici self-assigned this Jan 20, 2021
@cagataycivici cagataycivici added the Type: Bug Issue contains a bug related to a specific component. Something about the component is not working label Jan 20, 2021
@cagataycivici cagataycivici added this to the 3.2.0-rc.1 milestone Jan 20, 2021
@cagataycivici cagataycivici changed the title ConfirmPopup : useConfirm define target ConfirmPopup : useConfirm define target is missing in ts Jan 20, 2021
@mewforest
Copy link

mewforest commented Jun 11, 2021

Same here (Vue 3).. Any updates?

    at Function.absolutePosition (utils.esm.js?dd76:177)
    at Proxy.alignOverlay (confirmpopup.esm.js?9421:96)
    at Proxy.onEnter (confirmpopup.esm.js?9421:80)
    at eval (runtime-dom.esm-bundler.js?830f:551)
    at Object.enter (runtime-core.esm-bundler.js?5c40:2398)
    at Array.eval (runtime-core.esm-bundler.js?5c40:3942)
    at flushPostFlushCbs (runtime-core.esm-bundler.js?5c40:355)
    at flushJobs (runtime-core.esm-bundler.js?5c40:391)```

@EmmanuelChukwujindu
Copy link

Lucky I found this. This update should be added to the documentation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Projects
None yet
Development

No branches or pull requests

5 participants