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

Feature request: Create new tag when in Object mode #36

Open
AaronMLB opened this issue Jul 13, 2022 · 0 comments
Open

Feature request: Create new tag when in Object mode #36

AaronMLB opened this issue Jul 13, 2022 · 0 comments

Comments

@AaronMLB
Copy link

In almost all instances I'm using BulmaTagsInput in object mode (numeric id and string text value pairs), with XHR suggestion source, on an <input type="text"> field.

In certain use cases, it would be really useful to be able to create a new tag, rather than just selecting from existing ones.

Based on the following code currently creating a POST value of comma-delimited IDs...

    var tags = tagInputField.BulmaTagsInput().items;
    var values = [];
    tags.forEach(function(item) {
        values.push(item.id);
    });
    tagInputField.value = values.join(",");

... I would then expect any new values to be passed as an escaped text value, so the value received by the server might be something like 34,375,"Tokyo",698,"Badger\'s Lair",800 - and then obviously up to the server to create new records with the corresponding Tokyo and Badger's Lair text values, at the same time it records the IDs 34, 375, 698 and 800.

Might this be possible to implement, please?

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