Skip to content

FacetViewProps has incorrect typing #1104

Closed
@fvanderwielen

Description

@fvanderwielen

Describe the bug
FacetViewProps has incorrect typing:

  1. onRemove, onChange, onSelect are typed to take a FieldValue, but in actuality they handle a FilterValue. This prevents passing a FilterValueRange to these handlers in a typesafe manner.

  2. FacetViewProps should extend the basic prop set instead of strict direct assignment, as a ViewComponent can have additional props to support additional functionality. This allows to use this existing functionality in a type safe way, as it already passes through the rest props. The typesafety breaks though, because the typing of FacetViewProps and Facet do not allow for this.

Which backends and packages are you using:
Backend: [App Search, Elasticsearch, ]
Packages: [react-search-ui]

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingwontfixThis will not be worked on

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions