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

fix(gallery-service): Preserve ref config #593

Closed

Conversation

tvsbrent
Copy link

@tvsbrent tvsbrent commented Dec 8, 2023

  • When updating the configuration of an existing gallery ref, use the existing configuration as the basis instead of the service's default config.

This addresses issue #592

@MurhafSousli
Copy link
Owner

In this case, we can just use galleryRef.setConfig(config) because it already merges the new config with the existing ones

@tvsbrent
Copy link
Author

In this case, we can just use galleryRef.setConfig(config) because it already merges the new config with the existing ones

Could you explain how that might work? I spun up a new StackBlitz - linked below - which calls that method in the ngOnInit, but I didn't see the config changes reflected. Only setting the GALLERY_CONFIG in the provider seemed to have the desired effect:

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

@MurhafSousli
Copy link
Owner

@tvsbrent I meant in your PR, in the source code change you submitted galleryRef.setConfig(config) should be sufficient

@tvsbrent tvsbrent closed this Jan 4, 2024
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 this pull request may close these issues.

3 participants