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] No row checkboxes with enableExportButtons and default theme in v6 #621

Open
ArthurRM opened this issue Jan 20, 2025 · 3 comments
Open
Labels
documentation Improvements or additions to documentation

Comments

@ArthurRM
Copy link

Bug report

What I did

We have a PRO license and for one list I wanted to enable the export options. So added CRUD::enableExportButtons() in setup of that controller.

What I expected to happen

In the documentation there is checkboxes appearing for each row, I expect this to happen for my setup as well in order to make a selection to export.

What happened

The export buttons at the bottom do appear, but there is no row checkboxes.

What I've already tried to fix it

Removed the rest of the columns customization. Also tried adding the enableExportButtons in other places.

Is it a bug in the latest version of Backpack?

Yes, after I ran composer update backpack/crud the bug is it still there.

Backpack, Laravel, PHP, DB version

When I run php artisan backpack:version the output is:

PHP VERSION:

8.3.9

PHP EXTENSIONS:

Core, bcmath, calendar, ctype, date, filter, hash, iconv, json, SPL, pcre, random, readline, Reflection, session, standard, mysqlnd, tokenizer, zlib, libxml, dom, PDO, bz2, SimpleXML, xml, xmlreader, xmlwriter, openssl, curl, fileinfo, gd, gettext, intl, mbstring, Phar, pdo_mysql, pdo_pgsql, zip, soap

LARAVEL VERSION:

11.34.2.0

BACKPACK PACKAGE VERSIONS:

backpack/basset: 1.3.6
backpack/crud: 6.7.49
backpack/generators: v4.0.7
backpack/pro: 2.2.30
backpack/theme-tabler: 1.2.15

Additional information

None.

Copy link

welcome bot commented Jan 20, 2025

Hello there! Thanks for opening your first issue on this repo!

Just a heads-up: Here at Backpack we use GitHub Issues only for tracking bugs. Talk about new features is also acceptable. This helps a lot in keeping our focus on improving Backpack. If you issue is not a bug/feature, please help us out by closing the issue yourself and posting in the appropriate medium (see below). If you're not sure where it fits, it's ok, a community member will probably reply to help you with that.

Backpack communication channels:

  • Bug Reports, Feature Requests - GitHub Issues (here);
  • Quick help (How do I do X) - Gitter Chatroom;
  • Long questions (I have done X and Y and it won't do Z wtf) - Stackoverflow, using the backpack-for-laravel tag;
  • Showing off something you've made, asking for opinion on Backpack/Laravel matters - Reddit;

Please keep in mind Backpack offers no official / paid support. Whatever help you receive here, on Gitter, Slack or Stackoverflow is thanks to our awesome awesome community members, who give up some of their time to help their peers. If you want to join our community, just start pitching in. We take pride in being a welcoming bunch.

Thank you!

--
Justin Case
The Backpack Robot

Copy link

Based on the information provided in your bug report, it appears you're experiencing an issue with row checkboxes not appearing when using CRUD::enableExportButtons() in Backpack v6 with the default theme. Let's address this issue:

The knowledge sources don't contain specific information about this exact bug in Backpack v6. However, there are a few relevant points we can consider:

  1. In earlier versions of Backpack, enabling export buttons was sometimes linked to the appearance of row checkboxes for bulk actions. For example, in this issue from an older version, export buttons and bulk action checkboxes were related.

  2. There have been changes in how bulk actions and export buttons are handled in newer versions of Backpack. For instance, this issue mentions that column visibility and export buttons are now more tightly coupled.

Given this context, here are a few suggestions:

  1. Make sure you have also enabled bulk actions. Try adding this line to your controller's setup method:

    CRUD::enableBulkActions();
  2. Check if there are any JavaScript errors in your browser's console that might be preventing the checkboxes from rendering.

  3. Verify that you're not accidentally hiding the first column, as this could potentially hide the checkboxes. Ensure that the first column in your list has 'visibleInTable' => true.

  4. If you're using any custom views or overriding any Backpack templates, make sure they're compatible with the latest version.

If none of these suggestions solve the issue, it's possible that this is indeed a bug in the latest version of Backpack. In that case, I would recommend:

  1. Double-check the Backpack documentation for any recent changes or known issues related to export buttons and row checkboxes.

  2. If the problem persists, consider reporting this issue on the Backpack GitHub repository or the community forum, providing a minimal reproducible example of your setup.

Remember that as a PRO license holder, you also have access to priority support channels which might be able to provide more specific assistance for your setup.

ℹ️ Please note our AI Bot does not reply to follow-ups, this will be the only AI answer in this thread. If the AI helped you find the answer, please mark it as answered or write details below so it can learn. Then close the conversation. If not, please give more information for when a human reads this. ℹ️

Relevant sources:

Github Issue (open): Bulk actions checkbox is hidden when first column has visibleInTable=false
Github Issue (closed): [BUG] No export buttons on version 3.5
Github Issue (closed): Checkboxes for bulk actions are not shown
Github Issue (closed): [Bug] export buttom and browse field
Github Issue (closed): export buttons is not working
Github Issue (closed): [Bug] Editable Columns - Bulk Function Buttons not activating after editing
Github Issue (closed): [Bug] Column visibility select disappears together with Export buttons
Github Issue (closed): [Bug] Upgrade BackPack v5 to v6
Github Issue (closed): [Bug] Quick button implementation
Export setting
Github Issue (closed): [Bug] Bulk checkboxes don't shift-select from the bottom-up

@karandatwani92
Copy link
Contributor

Hey @ArthurRM

I'm sorry for the confusion the screenshot caused. The enableExportButtons API is not configured with checkboxes. The export button lets users export all visible rows on the screen.

The CRUD in the screenshot also utilizes a bulk operation, which lead to confusion. I'm moving the issue to the docs repo to replace the screenshot.

To have it with the checkbox, you can create a custom bulk operation for yourself.

@karandatwani92 karandatwani92 transferred this issue from Laravel-Backpack/CRUD Jan 20, 2025
@karandatwani92 karandatwani92 added documentation Improvements or additions to documentation and removed triage labels Jan 20, 2025
@Laravel-Backpack Laravel-Backpack deleted a comment from backpack-ai-bot bot Jan 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
Status: No status
Development

No branches or pull requests

2 participants