-
Notifications
You must be signed in to change notification settings - Fork 65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sidebar Search Filter #160
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
<div id="search"> | ||
<img src="<%= base_url %>/assets/images/search.svg"> | ||
<input autocomplete="off" placeholder="Search" /> | ||
</div> | ||
Comment on lines
+1
to
+4
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. One thing to note about the search behavior - if you filter the list, and then click on something that is in the sidebar, when the page renders, the search input is empty and the full sidebar is shown again. To fix this would require adding the current search value either to the URL or in the browser's local state. I am ok with the current behavior, but please let me know if you think this should be fixed so that when navigating between pages with a search applied, the search value is retained. |
||
<ul class="categories"> | ||
<li> | ||
<ul class="menu-root"> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I considered adding this Javascript in a separate file that gets added via a `<script> tag, but in the end opted to leave it here for simplicity. Please let me know if you would prefer it moved out, and if so, any thoughts you have on doing that.