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

🐛 Bug - Autocomplete loading state not shown unless it has data #2507

Closed
AndrewLeedham opened this issue Jun 23, 2023 · 6 comments
Closed
Assignees
Labels

Comments

@AndrewLeedham
Copy link
Contributor

Forma 36 bug report

Summary

When using the <Autocomplete> component with the isLoading attribute it requires items to have a value to render the "loading" dropdown. However, by the very nature of data being loaded we don't have any yet.

Environment

Arc/macOs

Steps to reproduce

This playground example shows isLoading with items as an empty array (no loading state) and adding a single undefined value (shows loading state).

Expected results

I would expect the loading state to still show with an empty array.

Actual results

The loading state is only shown if items has values.

@AndrewLeedham AndrewLeedham added the bug Something isn't working as expected label Jun 23, 2023
@github-actions
Copy link

Marking issue as stale since there was no activity for 30 days

@github-actions github-actions bot added the stale Used to mark when there was no activity for a set period of time label Jul 24, 2023
@AndrewLeedham
Copy link
Contributor Author

Still an issue.

@github-actions github-actions bot removed the stale Used to mark when there was no activity for a set period of time label Aug 1, 2023
@github-actions
Copy link

github-actions bot commented Sep 1, 2023

Marking issue as stale since there was no activity for 30 days

@github-actions github-actions bot added the stale Used to mark when there was no activity for a set period of time label Sep 1, 2023
@AndrewLeedham
Copy link
Contributor Author

...

@github-actions github-actions bot removed the stale Used to mark when there was no activity for a set period of time label Sep 2, 2023
@github-actions
Copy link

github-actions bot commented Oct 3, 2023

Marking issue as stale since there was no activity for 30 days

@github-actions github-actions bot added the stale Used to mark when there was no activity for a set period of time label Oct 3, 2023
@Lelith Lelith self-assigned this Oct 19, 2023
@Lelith
Copy link
Collaborator

Lelith commented Oct 19, 2023

Hey @AndrewLeedham,
i double checked the behaviour, and to force showing the loading state, there is already an attribute called showEmptyList

      <Autocomplete
        isLoading
        showEmptyList
        items={[]}
        onInputValueChange={handleInputValueChange}
        onSelectItem={handleSelectItem}
      />

See working example in the Playground

@Lelith Lelith closed this as completed Oct 19, 2023
@Lelith Lelith added solved and removed bug Something isn't working as expected stale Used to mark when there was no activity for a set period of time labels Oct 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants