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

Notifications UI: add all filter to table #989

merged 5 commits into from Sep 10, 2019
Changes from 2 commits
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.


Just for now

@@ -10,7 +10,6 @@ import {
@@ -92,20 +92,25 @@ const SubscriptionsTable = React.memo(function SubscriptionsTable({
}, [])

const organizations = Array.from(
new Set( => subscription.ensName))
const subscriptionApps = Array.from(
new Set( => subscription.appName))
const events = Array.from(
new Set( => subscription.eventName))
const organizations = [
'All', Set( => subscription.ensName)),
const subscriptionApps = [
'All', Set( => subscription.appName)),
const events = [
'All', Set( => subscription.eventName)),
const filteredSubscriptions = filterSubscriptions({
event: events[selectedEvent],
appName: subscriptionApps[selectedApp],
organization: organizations[selectedOrganization],
event: selectedEvent > 0 ? events[selectedEvent] : null,

This comment has been minimized.

Copy link

sohkai Sep 9, 2019


In addition to doing this, we should also default the selectedEvent, selectedApp and selectedOrganization state to be -1 (when we select 'All'), so that it deactivates the filter.

This comment has been minimized.

Copy link

2color Sep 9, 2019

Author Contributor

Not sure I understood but do you mean selecting -1, i.e. the dropdown label when All is selected?

If so, I've pushed a commit for that.

This comment has been minimized.

Copy link

AquiGorka Sep 9, 2019


Yep, that's what he meant. We' ve been doing it this way: when the user selects All, we actually set the index to -1 (as if none was selected). When none, is selected then apply no filter and the filter does not show the blue outline for a (non -1) selected option.
Hope this helps clarify.

appName: selectedApp > 0 ? subscriptionApps[selectedApp] : null,
organization: selectedOrganization
This conversation was marked as resolved by 2color

This comment has been minimized.

Copy link

sohkai Sep 9, 2019


Should this also have an > 0 check?

? organizations[selectedOrganization]
: null,

const handleUnsubscribe = useCallback(
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.