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

Assigning false to setCanCreate makes the field to disappear after selecting an option. #267

Open
oswaldojerezz opened this issue Oct 26, 2023 · 3 comments

Comments

@oswaldojerezz
Copy link

If a field has setCanCreate(false) the UI crashes when an option is selected with the following JS Issue:
Screenshot 2023-10-25 at 4 46 39 PM

Failing on Line 39 - TagField.js:
const element = this.selectComponentRef.select.wrapper;

silverstripe-tagfield version: 2.11.2

@RoyalPulp
Copy link

same here!

@dpezer
Copy link

dpezer commented Nov 16, 2023

Same here. I've replaced it with ListboxField (this one works, if you don't need "create" option).

erikfrerejean added a commit to wedevelopnl/silverstripe-portfolio that referenced this issue Nov 21, 2023
Disable the `setCanCreate(false)` call in the category tag field, this breaks in the latest version of the module.

See: silverstripe/silverstripe-tagfield#267
erikfrerejean added a commit to wedevelopnl/silverstripe-portfolio that referenced this issue Nov 21, 2023
Disable the `setCanCreate(false)` call in the category tag field, this breaks in the latest version of the module.

See: silverstripe/silverstripe-tagfield#267
@matt-in-a-hat
Copy link

matt-in-a-hat commented Mar 11, 2024

FWIW it seems that this issue was introduced in this PR - #262
Rolling back to version 2.11.1 fixes this issue for me.

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

No branches or pull requests

5 participants