Sage / carbon

Carbon by Sage | ReactJS UI Component Library
https://carbon.sage.com
Apache License 2.0
278 stars 85 forks source link

MutiSelect: add onListScrollBottom prop. #6752

Open hegou33 opened 5 months ago

hegou33 commented 5 months ago

Description

Select and FilterableSelect have the option to use onListScrollBottom to have lazy loading.

Suggested solution

Add the possibility to use onListScrollBottom on MutiSelect.

Demo URL

No response

Alternatives

No response

Additional context

No response

Confidentiality

edleeks87 commented 5 months ago

@harpalsingh are you okay with us adding this feature to MultiSelect

Parsium commented 5 months ago

@harpalsingh for context, this will allow consumers to implement a lazy loading pattern as mentioned by @hegou33. In this pattern, the component will load and render additional options when the user scrolls to the bottom of the dropdown list. This is similar to the example demonstrated with FilterableSelect in Storybook.

ljemmo commented 3 months ago

@Parsium chatting with harpal, it looks fine from a design perspective. From a DS perspective though, i'd suggest we use a small spinner as brand are discouraging the use of loader dots.

I think this also needs a review from accessibility @v99rly might be able to assist

v99rly commented 3 months ago

Lazy load isnt great from an accessibility perspective im afraid. It would be better if we had a physical button at the bottom that said Load More.

Parsium commented 3 months ago

Thanks for this @v99rly 👍🏼 Regarding adding a loading button at the bottom of the dropdown list, we have support for this in FilterableSelect, but not in SimpleSelect or MultiSelect, so we'd need to add this feature in. If this pattern is the more accessible option, I'd suggest that this is the solution we go for. Is this okay with you @hegou33?

nineteen88 commented 3 months ago

@hegou33 Hey. Just chasing on James' question from last week. Is this solution suitable for you?

hegou33 commented 1 month ago

We want to have the same design to load more Option on FilterableSelect, SimpleSelect and MultiSelect. So okay for me.

tomdavies73 commented 1 month ago

FE-6864