Skip to content
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

NP 71 Scroll Functionality in Course Search #706

Merged
merged 3 commits into from
Oct 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/components/planner/Sidebar/DraggableCourseList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export interface DraggableCourseListProps {
function DraggableCourseList({ courses, getDragId }: DraggableCourseListProps) {
// Add sorting logic here
return (
<div className="flex flex-col gap-y-4 bg-white text-[#757575]">
<div className="flex max-h-64 flex-col gap-y-4 overflow-scroll bg-white text-[#757575]">
{courses.length > 0 ? (
courses.map((course, idx) => (
<DraggableSidebarCourseItem dragId={getDragId(course)} key={idx} course={course} />
Expand Down
2 changes: 1 addition & 1 deletion src/components/planner/useFuse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export default function useFuse<T>({ dataSet, keys, threshold = 0.4 }: IUseSearc
}, [dataSet, keys, threshold]);

const updateQuery = (query: string) => {
setResults(fuse.search(query, { limit: 5 }).map((fuseResult) => fuseResult.item));
setResults(fuse.search(query, { limit: 100 }).map((fuseResult) => fuseResult.item));
};

/* const results = useMemo(() => {
Expand Down
Loading