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: Empty bulk actions dropdown menu when no bulk actions available. #585

Open
essenciary opened this issue Oct 3, 2024 · 0 comments
Open
Labels
bug Something isn't working

Comments

@essenciary
Copy link

essenciary commented Oct 3, 2024

Describe the bug
Empty bulk actions dropdown menu when no bulk actions avalable.

To Reproduce
Allow only "view" row actions, ex:

class ReadOnlyModelView(ModelView):
    def can_create(self, request):
        return False
    def can_edit(self, request):
        return False
    def can_delete(self, request):
        return False
    row_actions = ["view"]
    row_actions_display_type = RowActionsDisplayType.ICON_LIST
    actions = []

Environment (please complete the following information):

  • starlette-admin: 0.14.1
  • fastapi: 0.99.0
  • sqlmodel: 0.0.8

Can provide more packages on demand, but most likely not relevant.

Additional context
The best thing when no bulk actions are available would be to:

  • automatically hide the row checkboxes
  • never show the bulk actions button/dropdown
  • alternatively, config to hide checkboxes and bulk actions button

CleanShot 2024-10-03 at 14 28 21@2x


PS: thank you for the great software, it's very useful and productive! ♥️

@essenciary essenciary added the bug Something isn't working label Oct 3, 2024
@essenciary essenciary changed the title Bug: Bug: Empty bulk actions dropdown menu when no bulk actions available. Oct 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant