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] select2_from_ajax_multiple not clearing searched string on select #5679

Closed
GregaUNK opened this issue Sep 28, 2024 · 4 comments
Closed
Labels

Comments

@GregaUNK
Copy link

GregaUNK commented Sep 28, 2024

Bug report

What I did

When you start typing "Ama" in input and then select "Amazon", search string "Ama" will remain.

What I expected to happen

The ‘Ama’ string should be cleared so that you can immediately start typing the next search string. Bug is also present in demo.
Screenshot 2024-09-28 at 16 35 47

What I've already tried to fix it

Update.

Is it a bug in the latest version of Backpack?

Yes.

Backpack, Laravel, PHP, DB version

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, grpc, Zend OPcache

LARAVEL VERSION:

10.48.22.0

BACKPACK PACKAGE VERSIONS:

backpack/basset: 1.3.6
backpack/crud: 6.7.38
backpack/generators: v4.0.6
backpack/logmanager: v5.0.2
backpack/permissionmanager: 7.2.1
backpack/pro: 2.2.17
backpack/revise-operation: 2.0.0
backpack/theme-coreuiv2: 1.2.5
backpack/theme-coreuiv4: 1.1.2
backpack/theme-tabler: 1.2.13

@jcastroa87
Copy link
Member

Hello @GregaUNK

From my point of view, I don't think it's a bug, because if I want to choose all the matches of "jump", it would be inconvenient to have to type every time I need a result.

Anyway, I'll check with the team to see what they think about it.

Cheers.

@GregaUNK
Copy link
Author

GregaUNK commented Sep 29, 2024

Hi @jcastroa87

This functionality was changed during Backpack Crud PRO upgrades.

In 2.1.7 it works as I would expect. When you select entry, it clears the search.

Please change it back or give us an option to decide.

Thanks!

@jcastroa87
Copy link
Member

Hello @GregaUNK

Can you try to add to field

'closeOnSelect' => true,

Let me know if that's work for you.

Cheers.

@GregaUNK
Copy link
Author

GregaUNK commented Oct 1, 2024

Hi @jcastroa87

Thats it. It worked 👍

Maybe this could have a better name because it sounds like it closes the dropdown rather than just clearing the search. I also couldn’t find it in the documentation, so it would be nice to have it added.

Thanks! 💯

@GregaUNK GregaUNK closed this as completed Oct 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

No branches or pull requests

2 participants