leetcode-patterns
leetcode-patterns copied to clipboard
Two filters do not work together
Following steps to re-create this issue:
- Filter problems with any difficulty. (In the screenshot "easy" is selected)
- After this, filter out with any company. (Over here "Capital One" is selected)
In the screenshot, one can see it filters out with Capital One and clearly disregard the "easy" difficulty filter. I think UI should either incorporate "smart filtering" - results considering both the filters OR reset the previously selected filter from the screen.

Hey @Yashwin12 ✌🏽 Thanks a bunch for pointing this bug out - I just tried reproducing it using the STR you listed but it looks like filtering is working as intended:
https://user-images.githubusercontent.com/13009507/106686762-e9fc6a00-6598-11eb-9afc-c2e9fcf45afa.mp4
Are you able to reproduce it in Incognito mode, or just the regular website? We can try to narrow down what's busted from there
Hi @SeanPrashad, thank you for replying back. Actually, I found why it was behaving like this; I accidentally hit the "previous" button in the browser. Please consider below STR and gif to reproduce the filter issue.
- Select company filter. ( Over here "Capital One" is selected )
- Navigate to the "previous" page in the browser.
- Navigate back to the Leetcode Patterns page. You can still see the filter value is present, but the values are not shown according to its filter. (I think it disregards the filter value and shows all the results).
Amazing stuff! I am also able to confirm the bug based on your updated STR listed.
The current behaviour doesn't save your settings (ie. Which difficulty, companies, and patterns you have filtered by, if any).
Over in #87, it was requested that these settings be saved like how the checkboxes are via Local Storage. As of right now, I think this is a UI bug which will hopefully be solved when #87 lands!
Great! I think saving filter selection in local storage is a good idea, but as a user on the page refresh, it makes more sense (at least over here) to reset filters. Just my two cents!!