Skip to content
Merged
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: 2 additions & 0 deletions src/pages/PageOne/DemoCard.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@ const DemoCard = ({uploadFiles, width=300, title="Hiking", entries=[], isFirstCa

const matchers = {DOMAIN: isDomainFile, PROBLEM: isProblemFile, AP: isAnimationFile};
const filteredFiles = (keyword)=>{
// natural order, so prob_2plus2 comes before prob_10plus10 and is the default
return files.filter(item=>matchers[keyword](item.name))
.sort((a,b)=>a.name.localeCompare(b.name, undefined, {numeric: true}))
.map(item=>{
return {label:item.name, value:item.name}
})
Expand Down
Loading