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

Limited usage of custom components #29

Open
2 tasks
degloman opened this issue Oct 30, 2024 · 0 comments
Open
2 tasks

Limited usage of custom components #29

degloman opened this issue Oct 30, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@degloman
Copy link

Information

Currently, there's an issue with using custom components because it’s impossible to access their instance. For example, if we want to extend the functionality of this component (Stackblitz) by adding a "Revert" button with an action, we might try adding action=output<void>(). However, we won’t be able to listen to this event anywhere because we don’t have access to the instance of our custom component.

This limitation is visible in the main example as well, we are unable to react on the "Close" button press externally in any way.:

<!-- HTML -->
<ngx-sonner-toaster richColors closeButton />

// TypeScript
toast.custom(HeadlessToast);

// With props:
toast.custom(HeadlessToastComponent, {
  componentProps: {
    eventName: 'Louvre Museum'
  }
});

Describe any alternatives/workarounds you're currently using

No response

I would be willing to submit a PR to fix this issue

  • Yes
  • No
@degloman degloman added the enhancement New feature or request label Oct 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant