[ ] bug report => search github for a similar issue or PR before submitting
[x] feature request
[ ] support request => Please do not submit support request here, post on Stackoverflow or Gitter
Current behavior
getModalData returns plain js object.
Expected behavior
It should return observable that emits modal data whenever setModalData is called with given modal id
What is the motivation / use case for changing the behavior?
Better user experience when using modal data inside modal components. Now you need to subscribe on one of modal events to get modal data if it has been set after modal component has been created.
Using observables would remove this sort of temporal dependencies between component that sets the data and the modal. To use data in components only async pipe or subscribe and any changes would be applied automatically. It would also make composing data and modal events easier.
Hi @kpogorze,
I completely agree with you and observables are way more interesting to manipulate than plain objects. Since it'll be a BC, I put it in next major release.
I'm submitting a ... (check one with "x")
Current behavior
getModalData
returns plain js object.Expected behavior
It should return observable that emits modal data whenever
setModalData
is called with given modal idWhat is the motivation / use case for changing the behavior?
Better user experience when using modal data inside modal components. Now you need to subscribe on one of modal events to get modal data if it has been set after modal component has been created.
Using observables would remove this sort of temporal dependencies between component that sets the data and the modal. To use data in components only async pipe or subscribe and any changes would be applied automatically. It would also make composing data and modal events easier.
Please tell us about your environment:
Smart Modal version: 7.4.1
Angular version: 9
Browser: [all]
Language: [all]