Allow ReactiveList to optionally render a sort label when using sortOptions

Ouverte
#1,645 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Personne n'a encore pris cette issue.

Évaluation

Difficulté
3/5
Temps estimé
1-2 jours
Accessibilité débutants
35/100
Type d'issue
Fonctionnalité
Clarté
À clarifier
Activité
À l'abandon
Stack technique
javascript, react
Domaine
frontend

Piste de recherche

Commencez par localiser l’implémentation de ReactiveList de sortOptions et renderSortOptions, puis comparez son prop renderResultStats et le comportement de innerClass. Déterminez si le label doit utiliser un render prop personnalisé ou une option showSortLabel par défaut, et définissez le comportement de rendu attendu avant de vérifier les tests React pertinents.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

enhancement

Affected Projects
React

Is your feature request related to a problem? Please describe.
In our current application we make use of the ReactiveList sorting however this only produces the select dropdown and has no way to tap into the render process to add a custom label (i.e. Material UI Typography) named "Sort By".

Describe the solution you'd like
A few options would work. Simple option is to add a renderSortLabel prop which render the custom label and this is then referenced in the renderSortOptions function and if set renders the label before the select.

Or have a prop named showSortLabel that renders a default "Sort By" label.

Alternative option could be to replicate that of the renderResultStats function where a custom render function is passed in as a prop and would handles the complete generation of the sort although this does is make it a lot more complex due to the handleSortChange handler.

Describe alternatives you've considered
Will start looking the innerClass to see if it is possible to tap into the sortOptions this and use the ::before pseudo-element.

Additional context

Langage dominant
JavaScript
Étoiles
4.9k
Forks
478
Métriques de merge des PR
Aucune PR mergée en 30 j

Préparer son environnement

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de appbaseio/reactivesearch

Toutes les issues de appbaseio/reactivesearch

Issues similaires

Plus d'issues JavaScript

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.