Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

RangeInput Error for prop in Typescript

Aperta
#2,225 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
react, typescript
Ambito
frontend

Direzione di ricerca

Inizia individuando il componente RangeInput e la definizione delle sue props TypeScript, quindi confronta le props supportate con il riferimento alla documentazione ufficiale per showSlider. Verifica il comportamento previsto quando showSlider è false e aggiorna il tipo rilevante e la coverage in modo che la build accetti la prop e lo slider rimanga nascosto.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

bug

Affected Projects
Next

Library Version: 3.23.1

Describe the bug
I'm using the RangeInput component, but I don't want to show the slider. I don't know how, but when I use the prop showSlider with the value false, It works with error. Basically, the slider is gone, but It breaks the build. I thought that was a problem with the version, but even in the newest package, there is no prop to fulfill this purpose. The weird thing is that I found that prop in one of the official docs for that lib.

The Typescript error is this:

Type '{ componentId: string; dataField: string; "data-cy": string; URLParams: false; showSlider: boolean; snap: boolean; style: {}; value: Range | undefined; onChange: (value: any) => void; validateRange: ([start, end]: number[]) => boolean; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes<Component<RangeInputProps, any, any>> & Readonly<...> & Readonly<...>'.
  Property 'showSlider' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes<Component<RangeInputProps, any, any>> & Readonly<...> & Readonly<...>'.

Screenshots
With the "non existing" prop:
image

Without the "non existing" prop:
image

Lingua principale
JavaScript
Stelle
4.9k
Fork
479
Merge medio
4g 10h
PR unite (30g)
4

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di appbaseio/reactivesearch

Tutte le issue di appbaseio/reactivesearch

Issue simili

Altre issue su JavaScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.