Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ Feature Request ] Impalement scrollToSelectedOption in select hooks #250

Closed
AbrahemAlhofe opened this issue Jun 30, 2021 · 0 comments · Fixed by #251
Closed

[ Feature Request ] Impalement scrollToSelectedOption in select hooks #250

AbrahemAlhofe opened this issue Jun 30, 2021 · 0 comments · Fixed by #251

Comments

@AbrahemAlhofe
Copy link
Contributor

AbrahemAlhofe commented Jun 30, 2021

Is your feature request related to a problem? Please describe.

No response

Describe the solution you'd like

    - when `is-select` components be mounted
        set `ul.it-select-list` element as `scrollerRef` reference with `setScrollerRef`
    - when select an option 
        call `selectOption` with selected option's index as `optionIndex` argument
            set `selectedOptionIndex` variable with value of `optionIndex`
    - on call `scrollToSelectedOption`
        set `scrollTop` value of `scrollerRef` equal `offsetTop` of `selectedOption` 

Describe alternatives you've considered

none

Additional context

No response

AbrahemAlhofe added a commit to AbrahemAlhofe/Equal that referenced this issue Jul 1, 2021
    - bump package version to 0.78.0
    - cash `ul.it-select-list` element in `dropdownRef`
        | to use it in `scrollToSelectedOption`
    - make `selectOption` use option's index instead of `option: TOption`
        | to set `selectedOptionIndex` to get with it
        | the current selected option's reference
    - make `scrollToSelectedOption` set `scrollTop` of `scrollerRef`
      with `offsetTop` of `selectedOption`

close Equal-UI#250
quatrochan pushed a commit that referenced this issue Jul 3, 2021
- bump package version to 0.78.0
    - cash `ul.it-select-list` element in `dropdownRef`
        | to use it in `scrollToSelectedOption`
    - make `selectOption` use option's index instead of `option: TOption`
        | to set `selectedOptionIndex` to get with it
        | the current selected option's reference
    - make `scrollToSelectedOption` set `scrollTop` of `scrollerRef`
      with `offsetTop` of `selectedOption`

close #250
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant