I'm always excited to take on new projects and collaborate with innovative minds.

Address

Kayseri, Turkey

Social

What Are Cascading Filters (Dependent / Relational Filters)?

In classic filtering systems, every filter option is always active. This often drags users into combinations with no results, and the interface ends up showing them a "no products found" message, which is never a nice experience.

What Are Cascading Filters (Dependent / Relational Filters)?

What Do Cascading Filters Do?

When a filter is selected:

  • The options in the other filters update instantly
  • For that combination, options with no results get disabled
  • The user only navigates between combinations that actually exist

In other words, the filters are no longer independent of each other; they become interconnected (dependent).


Classic Filter vs Cascading Filter

Classic FilterCascading Filter
All options are always enabledOnly valid options are enabled
Invalid combinations can be selectedNo dead-end combinations
The user lands on a 0-results screenThe user always sees real results
Weak UXStrong, guiding UX

Real-Life Example – Real Estate

User:

 
Lokasyon: Şişli  

After this selection:

  • District list → only the districts within Şişli
  • Number of rooms → only those available in Şişli
  • Price histogram → based only on Şişli's price distribution
  • Elevator checkbox → active only if available in Şişli

This setup = Faceted Search with Cascading Filters


How Does the Frontend Logic Work?

The whole system runs off a single main dataset.

 
products = [  { location : "Şişli" , district : "Mecidiyeköy" , rooms : 2 , price : 18000 , elevator : true },  { location : "Şişli" , district : "Bomonti" , rooms : 3 , price : 25000 , elevator : false },  { location : "Beşiktaş" , district : "Levent" , rooms : 1 , price : 20000 , elevator : true } ] 

The active filters selected by the user:

 
activeFilters = {   location : "Şişli" ,   district : null ,   rooms : null ,   elevator : null } 

The Cascading Algorithm

 
function applyCascadingFilters ( products, activeFilters ) {   const filtered = products. filter ( p =>     Object . keys (activeFilters). every ( key => {       if (!activeFilters[key]) return true       return p[key] === activeFilters[key]    })  )   return {     filteredProducts : filtered,     availableOptions : {       district : [... new Set (filtered. map ( p => p. district ))],       rooms : [... new Set (filtered. map ( p => p. rooms ))],       elevator : [... new Set (filtered. map ( p => p. elevator ))]    }  } } 

Then in the UI:

 
if (!availableOptions. rooms . includes ( 3 )) {   disable ( "3+1" ) } 

The UX Payoff

  • The user never ends up with empty results
  • The filter system guides the user down the right path
  • Search time gets shorter
  • Conversion rate goes up

That's why platforms like Amazon, Airbnb, Zillow and, of course, the ones I've built use this architecture.

Author Ahmet Yüceler

I build web and mobile products with 6+ years of experience. I share what I learn here.

Get in touch →

Leave a comment

Your email address will not be published. Required fields are marked *