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]: searchable select component default empty list #794

Closed
1 task
oemolla opened this issue Feb 6, 2024 · 10 comments · Fixed by #803
Closed
1 task

[BUG]: searchable select component default empty list #794

oemolla opened this issue Feb 6, 2024 · 10 comments · Fixed by #803
Assignees
Labels
bug Something isn't working bug-confirmed When bug confirmed by the maintainers released on @beta released

Comments

@oemolla
Copy link
Contributor

oemolla commented Feb 6, 2024

Issue description

When we click on the bl-select component to search, an orange line appears.

Media & Screenshots

Screenshot 2024-02-06 at 11 45 36 AM

Baklava Version

No response

Operating system

No response

Priority this issue should have

High (immediate attention needed)

Please review the checkboxes that are applicable.

  • This issue is directly related to React
@oemolla oemolla added the bug Something isn't working label Feb 6, 2024
@erbilnas
Copy link
Contributor

erbilnas commented Feb 6, 2024

Have you attempted to provide a SelectOption? It will be displayed in that manner if there are no options available for the select.

@oemolla
Copy link
Contributor Author

oemolla commented Feb 6, 2024

SelectOption will be created once the search process concludes. Initially, there are no SelectOptions during the first render because the data is empty.

@erbilnas
Copy link
Contributor

erbilnas commented Feb 6, 2024

You should wait for the data fetching to complete before attempting to render, ensuring successful option rendering or you will attempt to re-render the select option

@oemolla
Copy link
Contributor Author

oemolla commented Feb 6, 2024

To start the data fetching process, I need to click bl-select and perform the action. The error happens right at this moment.

@erbilnas
Copy link
Contributor

erbilnas commented Feb 6, 2024

We are not currently supporting API fetching with search functionality, so you should handle the data manually. At the moment, providing a slot element to bl-select when fetching data can be worked around using the following approach:

<bl-select multiple search-bar search-bar-placeholder="Arama yapabilirsiniz">
    // custom slot 
</bl-select>

@oemolla
Copy link
Contributor Author

oemolla commented Feb 6, 2024

I am currently using this method. I just wanted to let you know because component trying to create an option with empty data.

@AykutSarac
Copy link
Member

This appears to be a UI scenario, so we can seek assistance from @buseselvi in this matter. What should be shown to the user if no selection option has been added?

@buseselvi
Copy link
Contributor

We shouldn't show the select popover / a line like in the image above if the popover is empty, we should show only the select input. Let's fix it 🚀

@erbilnas erbilnas added the bug-confirmed When bug confirmed by the maintainers label Feb 20, 2024
@erbilnas erbilnas self-assigned this Feb 20, 2024
leventozen pushed a commit that referenced this issue Feb 28, 2024
Closes #794

Co-authored-by: Erbil Nas <erbil.nas@trendyol.com>
Copy link

🎉 This issue has been resolved in version 3.0.0-beta.5 🎉

The release is available on:

Your semantic-release bot 📦🚀

Copy link

github-actions bot commented May 2, 2024

🎉 This issue has been resolved in version 3.1.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working bug-confirmed When bug confirmed by the maintainers released on @beta released
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants