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 Select2SlaveAJAXWidget not loading options [4.5.1] #2271

Open
kmorkah opened this issue Sep 13, 2024 · 2 comments
Open

Bug Select2SlaveAJAXWidget not loading options [4.5.1] #2271

kmorkah opened this issue Sep 13, 2024 · 2 comments

Comments

@kmorkah
Copy link

kmorkah commented Sep 13, 2024

found the related_fields example in Select2SlaveAJAXWidget code. There is no popup in select2 ajaxwidget.
It seems like this bug has been around for quite some time.

Environment

Flask-Appbuilder version: 4.5.1

pip freeze output:

apispec==6.6.1
attrs==24.2.0
babel==2.16.0
blinker==1.8.2
click==8.1.7
colorama==0.4.6
Deprecated==1.2.14
dnspython==2.6.1
email_validator==2.2.0
Flask==2.3.3
Flask-AppBuilder==4.5.1
Flask-Babel==2.0.0
Flask-JWT-Extended==4.6.0
Flask-Limiter==3.8.0
Flask-Login==0.6.3
Flask-SQLAlchemy==2.5.1
Flask-WTF==1.2.1
greenlet==3.1.0
idna==3.8
importlib_metadata==8.5.0
importlib_resources==6.4.5
itsdangerous==2.2.0
Jinja2==3.1.4
jsonschema==4.23.0
jsonschema-specifications==2023.12.1
limits==3.13.0
markdown-it-py==3.0.0
MarkupSafe==2.1.5
marshmallow==3.22.0
marshmallow-sqlalchemy==0.28.2
mdurl==0.1.2
ordered-set==4.1.0
packaging==24.1
pkgutil_resolve_name==1.3.10
prison==0.2.1
Pygments==2.18.0
PyJWT==2.9.0
python-dateutil==2.9.0.post0
pytz==2024.2
PyYAML==6.0.2
referencing==0.35.1
rich==13.8.1
rpds-py==0.20.0
six==1.16.0
SQLAlchemy==1.4.54
SQLAlchemy-Utils==0.41.2
typing_extensions==4.12.2
Werkzeug==3.0.4
wrapt==1.16.0
WTForms==3.1.2
zipp==3.20.1

Steps to reproduce

Run the related_fields example.
Load the create contact page.
Select a group
Open the select for sub-group
스크린샷 2024-09-13 10-02-16
You will not see a pop-up as shown below.

@ThomasP0815
Copy link
Contributor

ThomasP0815 commented Sep 14, 2024

Possible fix:

replace "select2.min.js" in templates/appbuilder/init.html with "select2.full.min.js"

<script src="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.13/js/select2.full.min.js" nonce="{{baselib.get_nonce()}}"></script>

stackoverflow
stackoverflow

related to #2021

@kmorkah
Copy link
Author

kmorkah commented Sep 19, 2024

Possible fix:

replace "select2.min.js" in templates/appbuilder/init.html with "select2.full.min.js"

<script src="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.13/js/select2.full.min.js" nonce="{{baselib.get_nonce()}}"></script>

stackoverflow stackoverflow

realated to #2021

Thanks for the advice. First of all, it's resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants