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] Pre-set object tags with dynamic data source for changes #31

Open
AaronMLB opened this issue Nov 9, 2021 · 2 comments
Open

[Bug] Pre-set object tags with dynamic data source for changes #31

AaronMLB opened this issue Nov 9, 2021 · 2 comments

Comments

@AaronMLB
Copy link

AaronMLB commented Nov 9, 2021

Using a dynamic data source works very well for initial input for tags on a form for adding a new record.

However, on an edit form where I have some previously entered tags to set up, new tags can not be added using the same XHR data source.

This may be related to the noted warning that

It is not possible to add tag by typing in this mode (only programmatically or using providing a data source).

I am able to type into the form, and suggestions are returned and returned correctly, but nothing happens when I click on one in the dropdown. Neither before.add nor after.add fire. The suggest dropdown simply closes.

It really should do something equivalent to the following:

inputTags.BulmaTagsInput().add([{
     option.itemValue: item.id,
     option.itemText: item.text
}]);
@AaronMLB
Copy link
Author

I've explored this further and realised I misdiagnosed the problem somewhat.

What actually appears to be happening is that bulma-tagsinput objects to an itemValue that is a single digit, i.e. 1 - 9.

Could you offer any advice please @CreativeBulma? Is the component still being supported or in any way in active development?

@AaronMLB
Copy link
Author

Okay, turns out the minChars option is at fault. It runs on the itemValue in object mode, not itemText as would be expected (and indeed implied by the docs).

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

1 participant