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

Simple filter to display matching instances in the dropdown. #489

Merged
merged 4 commits into from
Jun 10, 2023

Conversation

onowrouzi
Copy link
Contributor

login_instace_filter.webm

@@ -147,7 +150,7 @@ fun LoginForm(
expanded = false
},
) {
instanceOptions.forEach { selectionOption ->
instanceOptions.filter { instance.isEmpty() || it.contains(instance) }.forEach { selectionOption ->
Copy link
Member

Choose a reason for hiding this comment

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

I noticed a lot of slowness and keyboard issues here, and it might be because the filtering is being done inside the ExposedDropdown.

https://alexzh.com/jetpack-compose-dropdownmenu/

Check the bottom of that page, it has an example of filtering. Very close to yours, but try it out.

@onowrouzi onowrouzi force-pushed the login_instance_filter branch from b521137 to 278d312 Compare June 10, 2023 02:12
@onowrouzi onowrouzi requested a review from dessalines June 10, 2023 02:12
Copy link
Member

@dessalines dessalines left a comment

Choose a reason for hiding this comment

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

Works well, thank you!

@dessalines dessalines enabled auto-merge (squash) June 10, 2023 12:28
@dessalines dessalines disabled auto-merge June 10, 2023 12:30
@dessalines dessalines merged commit eb71f92 into LemmyNet:main Jun 10, 2023
@onowrouzi onowrouzi deleted the login_instance_filter branch June 10, 2023 14:27
@dessalines
Copy link
Member

Reverting this because it causes a lot of performance and weird issues with keyboards.

dessalines added a commit that referenced this pull request Jun 14, 2023
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 this pull request may close these issues.

3 participants