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

[Autocomplete] add infinite scroll for tags #21189

Closed
1 task done
hadasmaimon opened this issue May 24, 2020 · 4 comments
Closed
1 task done

[Autocomplete] add infinite scroll for tags #21189

hadasmaimon opened this issue May 24, 2020 · 4 comments
Labels
component: autocomplete This is the name of the generic UI component, not the React module! duplicate This issue or pull request already exists

Comments

@hadasmaimon
Copy link

hadasmaimon commented May 24, 2020

  • I have searched the issues of this repository and believe that this is not a duplicate.

Summary 💡

Do mui support an infinite scroll on a div/paper/semething?

Examples 🌈

I have to render more than 4000 tags, so I want that on scroll, more tags will appear (not all tags will be on the dom, but only some), otherwise it will be very slow

is there a solution for me?

image

Motivation 🔦

@oliviertassinari oliviertassinari added component: autocomplete This is the name of the generic UI component, not the React module! duplicate This issue or pull request already exists labels May 24, 2020
@oliviertassinari
Copy link
Member

oliviertassinari commented May 24, 2020

You can find a duplicate thread about it in the issue history.

@hadasmaimon
Copy link
Author

ok, thanks
Can you write down the number of his duplicate, please?
It will really help

@oliviertassinari
Copy link
Member

oliviertassinari commented May 24, 2020

Your own issue #20782. You are free to customize the rendering. We don't have he bandwidth to solve every edge cases, nor do we aim for it.

@sfaman
Copy link

sfaman commented Jun 22, 2021

use condition on the renderTags to make it scrollable onFocus. Here is an Example
renderTags={(value, getTagProps) => {
if (this.state.showOwnersScroll) {
return (

{value.map((option, index) => ( 10 ? option.title.substring(0, 7) + "..." : option.title } size="small" {...getTagProps({ index })} /> ))}

);
} else {
return value.map((option, index) => (
10
? option.title.substring(0, 7) + "..."
: option.title
}
size="small"
{...getTagProps({ index })}
/>
));
}
}}
onFocus={() =>
this.setState({ showOwnersScroll: true })
}
onBlur={() =>
this.setState({ showOwnersScroll: false })
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: autocomplete This is the name of the generic UI component, not the React module! duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

3 participants