Repository navigation
Refactor filters from crud model to get/set model with objects representing each level instead of targets. - #24
Conversation
…enting each level instead of targets.
| // Place your settings in this file to overwrite default and user settings. | ||
| { | ||
| "editor.tabSize": 4, | ||
| "editor.insertSpaces": true |
There was a problem hiding this comment.
This is unrelated but I noticed half of the files are using 2 spaces and others using 4. Going to reformat everything to 2 space after the code review is complete, but didn't want to do it now since it introduces lot of white-space change noise in the review.
| private getTargetUrl(target?: models.IPageTarget | models.IVisualTarget): string { | ||
| let targetUrl; | ||
| if (event.name === 'pageChanged') { | ||
| value.page = new Page(embed, event.value.page.name); |
There was a problem hiding this comment.
This is the weird part about require event data to be instances of Pages classes instead normal page objects.
It feels awkward to have logic specific to different types of events instead of treating them uniformly.
|
I still have some more tests to add, but wanted to send it out early |
| } | ||
|
|
||
| export class Report extends embed.Embed implements IReport, IFilterable { | ||
| static allowedEvents = ["dataSelected", "filtersApplied", "pageChanged", "error"]; |
There was a problem hiding this comment.
what about loaded event?
There was a problem hiding this comment.
Yea, you had commented on this in previous review. The loaded event is for all embeds so it's in the generic embed class.
There was a problem hiding this comment.
OK, I forgot what was the answer there. Thanks for the reminder
…ey are not interface for class, but for traversing tree
… object equality in catch blocks.
Added Page and Visual objects
Added IFilterable
Updated powerbi-models dependency
Updated tests existing tests and added new ones for Page and Visual related actions.