-
Notifications
You must be signed in to change notification settings - Fork 908
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] [PRO] When clearing the option in select2_json_from_api
field, set the value to null
#5731
Comments
null
select2_json_from_api
field, set the value to null
Thank you for your question about the The issue of clearing values in select2 fields has been addressed in several Backpack updates. For example, in PR #3301, a fix was implemented to clear ajax select options when clearing the value. This PR aimed to solve the problem of previous fetched options still being available to select while the field fetches new options from the server. Additionally, in PR #2426, a fix was implemented to allow select2_from_ajax to send an empty value when cleared. This PR addressed the issue of the field not being present in the request if cleared in newer versions of select2. While these PRs don't directly address the Your proposed code change seems to aim at setting the value to However, without more specific information about the If you're experiencing a specific issue with the ℹ️ 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 (closed): Clean dependant select contents on change. Now only sets value to null. |
Thanks @susanu I've merged the fix in backpack/pro and should release a new version later today 🙏 Cheers |
File:
backpack/pro/resources/views/fields/select2_json_from_api.blade.php
| Lines 177->178From:
To:
The text was updated successfully, but these errors were encountered: