Add option to show new creatable item as first or last option
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 45/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Ferma
- Stack tecnologico
- javascript, react
- Ambito
- frontend
Direzione di ricerca
Inizia in src/Creatable.js, nel punto di inserimento dell'opzione intorno alla riga 122, e verifica come il componente Creatable espone le props. Aggiungi la scelta booleana richiesta per posizionare la nuova opzione creatable per prima o per ultima, quindi verifica che ogni impostazione produca l'ordine previsto delle opzioni.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Hello,
I'm not sure what your general policy is for making changes to react-select-plus that are not already merged upstream into react-select but I thought I'd try anyway! 😎
Sometimes I'd like to discourage my users from creating a new option without at least looking through the list for similar options. In this case, I'd like the new "creatable" option to be last, rather than first.
I created a PR in react-select (JedWatson/react-select#1436) for this but I'm also using react-select-plus and it would be very useful for me to have it here.
The key change is adding a boolean prop to Creatable and use either unshift as it's currently doing or use push based on the prop here.
if (showNewOptionAtTop) {
filteredOptions.unshift(this._createPlaceholderOption);
} else {
filteredOptions.push(this._createPlaceholderOption);
}
Please let me know what you think. I'd be happy to fork and create a PR but I don't want to duplicate my changes here if you'd rather wait for them to merge it upstream.
Thanks!
- Lingua principale
- JavaScript
- Stelle
- 284
- Fork
- 90
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di HubSpot/react-select-plus
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 35/100
HubSpot/react-select-plus#128 · 1 commento ·
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 15/100
HubSpot/react-select-plus#127 ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 30/100
HubSpot/react-select-plus#126 · 3 commenti · 13 reazioni ·
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 20/100
HubSpot/react-select-plus#124 ·
-
No supports for react 16+ Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 20/100
HubSpot/react-select-plus#123 · 4 commenti · 3 reazioni ·
Tutte le issue di HubSpot/react-select-plus
Issue simili
-
bug confirmed issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
open-webui/open-webui#30750 · 1 commento ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
Mend: dependency security vulnerability untriaged
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100