thekimsplustwo / VanCityPropertyPulse

Vancouver Real Estate Web Application
https://vancitypropertypulse.com/
3 stars 0 forks source link

Search Params: min/maxPrice handle onChange #122

Closed jieunkxx closed 1 year ago

jieunkxx commented 1 year ago

https://github.com/czhaoca/TheKimsPlusTwo/assets/67996710/6e154965-2f63-4462-aeab-8d42284d6c75

https://github.com/czhaoca/TheKimsPlusTwo/assets/67996710/e7e06f37-01be-4556-b3d3-0871cb5a9933

https://github.com/czhaoca/TheKimsPlusTwo/assets/67996710/ab80074a-923a-4a4c-9cda-74cd6ad78a78

https://github.com/czhaoca/TheKimsPlusTwo/assets/104462860/8dbe23cb-1e75-46cd-9fd5-1ad24a612c89

https://github.com/czhaoca/TheKimsPlusTwo/assets/104462860/317c08ba-008f-4790-811b-8289f3f6d01d

chohyeonkim commented 1 year ago

@jieunkxx

Any change to min/maxPrice makes the home listing API request, not on apply -> I can't seem to reproduce this bug on my end. Can you show me How you do it on zoom?

minPrice cannot be applied before setting maxPrice -> this was actually intended to make sure min is always less or at least equal to Max. Do you have any specific thoughts on how it should work?

parsing NaN needs to be handled -> Could you explain more about this issue?

chohyeonkim commented 1 year ago

@jieunkxx

navigate to home button should reset the filter values

-> I am looking into this issue , seems like I can not reset the those filter values without re-rendering the components in the Home page

I noticed that VanCityPropertyPulse btn re-rendering the all component ( that's why it's resetting the all values when you click it )

image

image

this is because i used href because of Link ( did not notice back then) In traditional web applications, clicking a link with an href attribute causes the browser to make a new GET request to the server, load the new page, and replace the current page.

Normally in React, we want to avoid full page reloads which is designed to load only necessary data and update portions of the webpage in response to user interactions

I also have looked in other reference pages such as Zolo and Zillow, their components dont seem to be re rendering when navigate to the same page ( i will add those videos on the posting above) assuming those filter values are not resetting

If you want, i can still reset those filter values by fully re-loads the webpage or if you have other ideas, let me know

thank you