Skip to content
This repository has been archived by the owner on Dec 30, 2022. It is now read-only.

feat(hooks): add useRange #3198

Merged
merged 5 commits into from
Nov 24, 2021
Merged

feat(hooks): add useRange #3198

merged 5 commits into from
Nov 24, 2021

Conversation

Haroenv
Copy link
Contributor

@Haroenv Haroenv commented Nov 17, 2021

Summary

implement useRange

Result

example implemented RangeInput with approximately the same code as existing React InstantSearch, with the value/start transformations done in InstantSearch as well: https://github.com/algolia/instantsearch.js/blob/dcbbd8804b4b6471d24820b42826b57388974c27/src/widgets/range-input/range-input.tsx#L144-L154

FX-443

@Haroenv Haroenv requested review from a team, dhayab and tkrugg and removed request for a team November 17, 2021 14:35
@codesandbox-ci
Copy link

codesandbox-ci bot commented Nov 17, 2021

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 7afbed9:

Sandbox Source
react-instantsearch-app Configuration
routing-basic Configuration
hooks-example Configuration

@netlify
Copy link

netlify bot commented Nov 17, 2021

✔️ Deploy Preview for react-instantsearch ready!

🔨 Explore the source changes: 7afbed9

🔍 Inspect the deploy log: https://app.netlify.com/sites/react-instantsearch/deploys/619d41b552e6c900072dab6a

😎 Browse the preview: https://deploy-preview-3198--react-instantsearch.netlify.app

examples/hooks/components/RangeInput.tsx Outdated Show resolved Hide resolved
packages/react-instantsearch-hooks/README.md Outdated Show resolved Hide resolved
@Haroenv Haroenv requested a review from dhayab November 22, 2021 10:02
examples/hooks/App.tsx Outdated Show resolved Hide resolved
examples/hooks/components/RangeInput.tsx Outdated Show resolved Hide resolved
examples/hooks/components/RangeInput.tsx Outdated Show resolved Hide resolved
examples/hooks/components/RangeInput.tsx Outdated Show resolved Hide resolved
refine([from, to]);
}}
>
<input
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't use the step property?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can set it, I'm not really a fan on how precision gets turned into step in InstantSearch.js, seems like needless indirection

examples/hooks/components/RangeInput.tsx Outdated Show resolved Hide resolved
examples/hooks/components/RangeInput.tsx Outdated Show resolved Hide resolved
@Haroenv Haroenv merged commit df1f1c8 into master Nov 24, 2021
@Haroenv Haroenv deleted the feat/hooks-range branch November 24, 2021 09:20
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants