-
Notifications
You must be signed in to change notification settings - Fork 22
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
[very WIP] Filter-overflow-group: Events #4299
base: main
Are you sure you want to change the base?
Conversation
Thanks for the PR! 🎉 We've deployed an automatic preview for this PR - you can see your changes here:
Note The build needs to finish before your changes are deployed. |
@d2l-filter-dimension-search=${this._handleSearch}> | ||
${repeat(this._dimensions, dimension => dimension.key, dimension => this._renderDimensionSet(dimension))} | ||
</d2l-filter> | ||
<d2l-filter-overflow-group max-to-show="1"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was just modified temporarily to work on search and load more.
@@ -105,9 +116,27 @@ class FilterOverflowGroup extends OverflowGroupMixin(RtlMixin(LitElement)) { | |||
if (!filterSetValue) return; | |||
filterSetValue.selected = change.selected; | |||
}); | |||
|
|||
this._getFilterParent(e.target.classList, filterSet)?.requestFilterChangeEvent(e.detail.allCleared, [dimension], { overflowEvent: true }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When a filter change event happens on the overflow filter, the original filter that is currently hidden is then found and the change event is triggered on it.
Would need to test and make sure that if a change handler on the original filter changed something within that original filter that it is then reflected to overflow group filter.
if (!filterSet) return; | ||
const filter = this._getFilterParent(e.target.classList, filterSet); | ||
filter.requestFilterLoadMoreEvent(e.detail.key, e.detail.value, e.detail.loadMoreCompleteCallback); | ||
this._handleSlotChange(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Calling this when load more
and search
occurred did refresh the overflow group filter contents, but also some features were missing like having the selected items at the top of the list, and on search the selected items were all still visible. This can likely be simplified.
Rally
The change events pass through as expected now. The load more and search are much more complex (will add comments).