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

Gallery Config overwritten in GalleryService ref method #592

Closed
tvsbrent opened this issue Dec 8, 2023 · 0 comments · Fixed by #583
Closed

Gallery Config overwritten in GalleryService ref method #592

tvsbrent opened this issue Dec 8, 2023 · 0 comments · Fixed by #583

Comments

@tvsbrent
Copy link

tvsbrent commented Dec 8, 2023

What is the expected behavior?

When setting config via the GalleryService.ref method, the config be preserved through multiple invocations of the method.

What is the current behavior?

The default config in the service overwrites any previously set values. It looks like this line is the culprit, as it is always pulling in this.config to be overwritten, but it seems like galleryRef.config should be used instead.

https://github.com/MurhafSousli/ngx-gallery/blob/master/projects/ng-gallery/src/lib/services/gallery.service.ts#L31C38-L31C38

What are the steps to reproduce?

https://stackblitz.com/edit/ngx-gallery-x3gk2f?file=src%2Fmain.ts

What is the use-case or motivation for changing an existing behavior?

Currently config values that are not exposed as inputs to the component cannot be set, unless they are set as the default config.

Which versions are you using for the following packages?

Angular: 16.1.5
Angular CDK: 16.1.5
Angular CLI: ?
Typescript: ?
Gallery: 11.0.0

Is there anything else we should know?

I opened a PR that I think addresses the issue. I linked the library locally and I was seeing the navigation icon I was setting in the component being used.

@MurhafSousli MurhafSousli linked a pull request Dec 22, 2023 that will close this 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

Successfully merging a pull request may close this issue.

1 participant