-
Notifications
You must be signed in to change notification settings - Fork 165
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
Empty attribute values should be sorted consistently #563
Labels
Comments
Stratégie de développement de la correctionLocalisation du problèmeLe tri des items est effectué dans le composant sort = memoize((items, criteria) => items.sort(by(`${criteria}.0`)));
|
Simulation in vitro du problèmeTesté sur RunKit. Avec des valeurs nulles : const by = require('compare-func');
[
{name:'A', creator:'2'},
{name:'D', creator:null},
{name:'C', creator:'1'},
{name:'B', creator:null}
].sort(by('creator')) Array (4 items)
0: Object {name: "D", creator: null}
1: Object {name: "B", creator: null}
2: Object {name: "C", creator: "1"}
3: Object {name: "A", creator: "2"}
length: 4
Array Prototype Avec des valeurs indéfinies : const by = require('compare-func');
[
{name:'A', creator:'2'},
{name:'D'},
{name:'C', creator:'1'},
{name:'B'}
].sort(by('creator')) Array (4 items)
0: Object {name: "A", creator: "2"}
1: Object {name: "D"}
2: Object {name: "C", creator: "1"}
3: Object {name: "B"}
length: 4
Array Prototype |
Avec des tableaux (comme dans le code de Porphyry). const by = require('compare-func');
[
{name:'A', creator:['Moi']},
{name:'D'},
{name:'C', creator:['Lui']},
{name:'B'}
].sort(by('creator.0')) Array (4 items)
0: Object {name: "A", creator: ["Moi"]}
1: Object {name: "D"}
2: Object {name: "C", creator: ["Lui"]}
3: Object {name: "B"}
length: 4
Array Prototype Ne fonctionne ni avec const by = require('compare-func');
[
{name:'A', creator:['Moi']},
{name:'D', creator:['']},
{name:'C', creator:['Lui']},
{name:'B', creator:['']}
].sort(by('creator.0')) Array (4 items)
0: Object {name: "D", creator: [""]}
1: Object {name: "B", creator: [""]}
2: Object {name: "C", creator: ["Lui"]}
3: Object {name: "A", creator: ["Moi"]}
length: 4
Array Prototype |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
What is the valuable outcome that cannot be achieved because of this bug?
For which stakeholder (people, role, project, domain) is it important?
Reproduction scenario
Steps to reproduce the behavior:
spatial
Expected behavior
They should be either at the beginning or at the end of the list.
Workaround
Solution you found to avoid the problem.
Deliverables status
Phase 1
Phase 2
The text was updated successfully, but these errors were encountered: