-
Notifications
You must be signed in to change notification settings - Fork 906
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
Allow developer to configure the behavior of actions buttons dropdown #5667
Conversation
Hi Pedro, Looks good to me. Great job! |
@pxpm I've updated to v6.7.37 with no other changes and: All my cruds have this: $this->crud->setOperationSetting('lineButtonsAsDropdown', true); |
Hey @blondie63 I cannot reproduce your issue. You updated from what version ? I don't think this PR has any change that would break that, it could be some other change 🤷 Let me know, cheers. |
Hi @pxpm here some info: PHP VERSION:8.3.11 PHP EXTENSIONS:Core, date, libxml, openssl, pcre, sqlite3, zlib, bcmath, bz2, calendar, ctype, curl, dba, dom, hash, FFI, fileinfo, filter, ftp, gd, gettext, gmp, json, iconv, intl, SPL, ldap, mbstring, session, standard, odbc, pcntl, exif, mysqlnd, PDO, pdo_dblib, pdo_mysql, PDO_ODBC, pdo_pgsql, pdo_sqlite, pgsql, Phar, posix, pspell, random, readline, Reflection, mysqli, shmop, SimpleXML, soap, sockets, sodium, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, xml, xmlreader, xmlwriter, xsl, zip, xdebug, Zend OPcache LARAVEL VERSION:11.23.5.0 BACKPACK PACKAGE VERSIONS:backpack/basset: 1.3.6 After a better check i've seen that only one crud have this problem and this is my code:
|
Hey @blondie63 most likely your custom button views are missing some attributes that backpack uses to identify the buttons?
Make sure you have them so that Backpack can properly find and manipulate them 👍 |
Hi @pxpm yes you are right, some our customization create problem and i've just fixed Thanks |
WHY
superseeds: #5568
BEFORE - What was wrong? What was happening before this PR?
The PR #5568 introduces a way for developers to control the behavior of line buttons when displayed as a dropdown.
While reviewing it I noticed that a very much likely use case for line buttons was to "force" some X amount of buttons to display inline and create the dropdown for the remaining.
AFTER - What is happening after this PR?
In addition to what the PR #5568 introduced (the minimum amount of items to drop, eg: less than 2 actions don't create a dropdown), it also introduces a way for developers to force the first X actions to display inline.
Docs for it can be found here: Laravel-Backpack/docs#598
HOW
How did you achieve that, in technical terms?
Added a new config:
lineButtonsAsDropdownDropAfter
in addition to thelineButtonsAsDropdownMinimumToDrop
Is it a breaking change?
No, the same defaults are kept (all buttons display in a dropdown).