fix: fire config-update evnt on perspective-viewer#1728
fix: fire config-update evnt on perspective-viewer#1728texodus merged 1 commit intoperspective-dev:masterfrom
Conversation
|
Thanks for the PR! Looks good! I've added a documented integration test for this in #1730 |
|
Thanks @texodus! I actually thought of a small enhancement to this fix: const viewer = regularTable.closest("perspective-viewer");
viewer?.dispatchEvent(new Event("perspective-config-update"));It is a little more specific on what it is trying to achieve and resilient to future DOM changes. I can push another PR or you can update it in #1730. Let me know what works best. |
|
I wouldn't worry about it unless it really bothers you 😄 The perspective source is riddled with rigid DOM structure lookups of this sort, sometimes for performance when a known structure is in a tight loop, but often just out of convenience/laziness/"readability". Personally, I prefer integration tests for behavior we want preserved, as opposed to scrutiny of the "robustness" of a particular implementation. |
|
Sounds good :)
Yes 💯 Thanks for adding the test. |
This PR resolves #1727 by firing the
perspective-config-updateevent onperspective-viewerelement.This was tested manually. Is there a good place to add a test for this behavior?