You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Source: (read-in-spreadsheet branch) PPUC/frontend/src/components/Commentary.jsx and PPUC/frontend/src/components/Researchers.jsx
Description: When clicking a keyword in the search box, it will redirect to the Researchers.jsx component but it will not enter the search. The keyword will fill the search box but the user will have to manually hit enter to see results on the second page.
To Reproduce: Click any keyword from the category box. Make a note of the URL and that the keyword appears in it and in the search bar itself. Hit enter or the arrow on the search bar
Solution: One thought about this issue comes from this section of code in Researchers.jsx const queryParams = QueryString.parse(this.props.location.search); if (queryParams.search) { this.setSearchQuery(queryParams.search, true); }
If you console log queryParams this shows the right value but then after the setSearchQuery call, this.props.searchQuery does not get updated (again can be seen by console logging immediately after the call is made). I believe this has to do with the "true" parameter being sent to the set function, which redirects to the handleSearch function. Changing true to false is one theory to fix it, but that would then interfere with the scrolling and highlighting feature. In debugging this issue, this is the first area to look at as well as what is being sent to handleSearch()/ why searchQuery is not being initialized with this.
Another idea would be to go to the location in Commentary.jsx that handles the links for these keywords and attempt to do two function calls, one for handleSearch() and another for setSearchQuery on the keyword itself. Issue with this is the href being using and onClick
The text was updated successfully, but these errors were encountered:
Source: (read-in-spreadsheet branch) PPUC/frontend/src/components/Commentary.jsx and PPUC/frontend/src/components/Researchers.jsx
Description: When clicking a keyword in the search box, it will redirect to the Researchers.jsx component but it will not enter the search. The keyword will fill the search box but the user will have to manually hit enter to see results on the second page.
To Reproduce: Click any keyword from the category box. Make a note of the URL and that the keyword appears in it and in the search bar itself. Hit enter or the arrow on the search bar
Solution: One thought about this issue comes from this section of code in Researchers.jsx
const queryParams = QueryString.parse(this.props.location.search); if (queryParams.search) { this.setSearchQuery(queryParams.search, true); }
If you console log queryParams this shows the right value but then after the setSearchQuery call, this.props.searchQuery does not get updated (again can be seen by console logging immediately after the call is made). I believe this has to do with the "true" parameter being sent to the set function, which redirects to the handleSearch function. Changing true to false is one theory to fix it, but that would then interfere with the scrolling and highlighting feature. In debugging this issue, this is the first area to look at as well as what is being sent to handleSearch()/ why searchQuery is not being initialized with this.
Another idea would be to go to the location in Commentary.jsx that handles the links for these keywords and attempt to do two function calls, one for handleSearch() and another for setSearchQuery on the keyword itself. Issue with this is the href being using and onClick
The text was updated successfully, but these errors were encountered: