Skip to content

Conversation

EChinLee
Copy link

@EChinLee EChinLee commented Nov 2, 2024

No description provided.

Copy link

@mjumbewu mjumbewu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well implemented! Just left one note below.


// Show namelist on the left, and add the click function to namelist
// Add click site to displaySidebarList
function displaySidebarList(geojsonData) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion: Looks like this function is overwriting whatever the previous filter was.

If you wanted the list to take into account all the currently-selected filters, there are a few ways you could be done. E.g., keep track of all the selected filters in a variable in a scope outside of this function, or refer to the filter controls directly from within this function. Something like:

Suggested change
function displaySidebarList(geojsonData) {
// Update the values below in the event handlers, and then
// refer to the values from displaySidebarList.
const siteFilters = {
zipCode: null,
name: null,
daysOpen: [],
mealTypes: [],
};
function displaySidebarList(geojsonData) {

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants