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

How can I apply customized template? #18

Closed
Jung-Younghun opened this issue Jul 13, 2018 · 5 comments · Fixed by #20
Closed

How can I apply customized template? #18

Jung-Younghun opened this issue Jul 13, 2018 · 5 comments · Fixed by #20
Assignees
Labels

Comments

@Jung-Younghun
Copy link

Jung-Younghun commented Jul 13, 2018

I wanna customize format of selected field and list field.
Can I use some options to apply template customized format with data value?
For example that I think(below),

selected field...

selectedFieldTemplate: function(dataItem){
    return dataItem.value + '(count: ' + dataItem.count + ')';
}

list item field...
In case of multi-select, I want to add checkbox in each item field.

listItemTemplate: function(dataItem){
    return '<input type="checkbox"/>' + dataItem.lable + '~' + dataItem.value;
}
@iNeoO
Copy link
Owner

iNeoO commented Jul 13, 2018

Hi,

For the first point you want this function only apply when element is selected ?

for the second point you prefer to see a checkbox instead of ✓ ?

@iNeoO iNeoO self-assigned this Jul 13, 2018
@iNeoO iNeoO added the feature label Jul 13, 2018
@Jung-Younghun
Copy link
Author

Jung-Younghun commented Jul 17, 2018

Hi,

#1
Not only when element is selected, I mean some functions to customize template of each items in title and popup of Combobox. Is there any API to do this?

#2
If I can customize template, I can use checkbox, highlight color or ✓(default from your component).

@iNeoO
Copy link
Owner

iNeoO commented Jul 17, 2018

for the first point yeah it should be possibble, i will make this feeature before the end of the week.

For the second point, not it's not possible, because i didn't split the component in two component and i don't use

@Jung-Younghun
Copy link
Author

Thanks,

if the first point should be possible, It's enough to use your component in my case.
Thanks for your help!!

@iNeoO
Copy link
Owner

iNeoO commented Jul 17, 2018

Take care, if you want to alter the option from outside of the multi-select for the you will need to manual reload multi-select. Options are deep copied for isolation.

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

Successfully merging a pull request may close this issue.

2 participants