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

[enhancement] Server side: support custom column names #44

Closed
mariusa opened this issue Mar 13, 2022 · 4 comments
Closed

[enhancement] Server side: support custom column names #44

mariusa opened this issue Mar 13, 2022 · 4 comments

Comments

@mariusa
Copy link
Contributor

mariusa commented Mar 13, 2022

Hi,

Server side should provide an array of value/label objects.

Would it be possible to please have new constructor options which say what server-side fields map to value/label?
eg valueField: 'id', labelField: 'title'

Thanks!

@lekoala
Copy link
Owner

lekoala commented Mar 17, 2022

added in https://github.com/lekoala/bootstrap5-tags/releases/tag/1.4.26 let me know if that works for you

@mariusa
Copy link
Contributor Author

mariusa commented Mar 17, 2022

Hi & thanks!

This doesn't work yet, as there are some places which still reference the hardcoded value field:

if (!initialValue.value) {

this.addItem(initialValue.textContent, initialValue.value);

return !firstOption.value ? firstOption.textContent : "";

if (!suggestion.value) {

@lekoala
Copy link
Owner

lekoala commented Mar 17, 2022

only the last one was an issue, the others are regular html options. should be good now

https://github.com/lekoala/bootstrap5-tags/releases/tag/1.4.27

@lekoala lekoala closed this as completed Mar 17, 2022
@mariusa
Copy link
Contributor Author

mariusa commented Mar 18, 2022

Works now, thanks!

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