Repository navigation
Replies: 16 comments 1 reply
|
Heyo! Glad it has proven useful for you :) Yes, let's get that sorted out. |
|
Check out this PR: #131 |
|
Wow, that was fast! Will try it out right now |
|
Works great! 🔥 Only thing i noticed is when using |
|
I cleaned up the API - you just need to pass in It sorts in descending direction by default, you can specify the direction with a second argument
Let me check if this is still an issue, because I changed the logic slightly to handle edges. |
|
Nice thank you! Will try it out this night |
|
The new API did not work for me unfortunately. Sorting is not being applied, will try to find time this evening to debug |
|
Taking a look now, I see there's an issue with inferred options. |
|
Issue should be fixed now - there were some (necessary) |
|
Will try it out now |
|
@kianbazza sorry for the ultra late response. I tested the changes from the PR in my code and it works all as expected. Tested both the client and server version. Thanks for the work! 🔥 |
|
Beautiful, thank you @d-stoll ! I'll be doing a bit more work on this, so you can "stack" orderFns on top of each other. In the example below, we're mixing pre-defined and custom orderFns: .orderFn(
['count', 'desc'],
(a, b) => Math.random() < 0.5 ? 1 : -1
['label', 'asc'],
)Thoughts? Any pre-defined orderFns you can think of besides these ones? |
|
@kianbazza Looks good! But I also like the simplicity of the previous API. Does 'label' in this case mean alphanumeric sorting on the label? |
|
You can still use the previous API - this is just an "add-on". If you have a single orderFn, you use the previous API, e.g.
Yes! It means we're ordering by the column option's |
Uh oh!
There was an error while loading. Please reload this page.
Hi! 👋🏼
Absolutely love the project! It's exactly what I was looking for and works great.
Is there a way to order the entries in option and multi-option via the
orderFnby the count? The use case is for classifications, for example, where displaying the most frequently used labels at the top would be ideal.All reactions