appbaseio / reactivesearch

Search UI components for React and Vue
https://opensource.appbase.io/reactivesearch
Apache License 2.0
4.89k stars 471 forks source link

RangeInput Error for prop in Typescript #2225

Open vitor-l opened 1 year ago

vitor-l commented 1 year ago

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

with-a-k commented 8 months ago

I'm not seeing any such prop in the documentation for RangeInput.