gregnb / gregnb/mui-datatables

filter - sort by relevancy

Open
#1,756 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
2.7k
Forks
906
PR merge metrics
No merged PRs in 30d

Description

Is there are way to change/influence the sort when filter is applied so the rows are shown by relevancy?
I have a row with 30k items. when someone makes a query, and only sets 3-4 words, they might get 30-40 records back.
I'd like a way to sort the items by relevancy to the queried item.
What's the best way of doing it?

I see the `customSort` function but it doesn't contain the filter, and it's not being retriggered when filter changes.
There's also the `sortCompare` but it's per column so I don't think it's relevant

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reviewing the mentioned customSort and sortCompare functions and how filtering updates the displayed rows. Determine how a relevance-based ordering could receive the active query and define the expected behavior for filtered results. Done means filtered rows can be consistently ordered by relevance.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react
Domain
frontend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.