We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
When I called callbackOnCreateTemplates to custom template.
callbackOnCreateTemplates
choice: (classNames,data) => { return templates( `<div class="${classNames.item} ${ classNames.itemChoice } ${ data.disabled ? classNames.itemDisabled : classNames.itemSelectable }" data-choice ${ data.disabled ? 'data-choice-disabled aria-disabled="true"' : "data-choice-selectable" } data-id="${data.id}" data-value="${data.value}" ${ data.groupId && data.groupId > 0 ? 'role="treeitem"' : 'role="option"' }><span style="margin-right:10px; width:12px; height:12px; background-color:${ data?.customProperties?.color };display:inline-block;vertical-align:middle;margin-top:-2px;"></span>${ data.label }</div>` ); },
But it worked when the code changed to
choice: ({classNames},data) => { return templates( `<div class="${classNames.item} ${ classNames.itemChoice } ${ data.disabled ? classNames.itemDisabled : classNames.itemSelectable }" data-choice ${ data.disabled ? 'data-choice-disabled aria-disabled="true"' : "data-choice-selectable" } data-id="${data.id}" data-value="${data.value}" ${ data.groupId && data.groupId > 0 ? 'role="treeitem"' : 'role="option"' }><span style="margin-right:10px; width:12px; height:12px; background-color:${ data?.customProperties?.color };display:inline-block;vertical-align:middle;margin-top:-2px;"></span>${ data.label }</div>` ); },
All attr of classNames are undefined. But they are worked in item.
undefined
item: (classNames, data) => { return templates( `<div class="${classNames.item} ${ data.highlighted ? classNames.highlightedState : classNames.itemSelectable }" data-item data-id="${data.id}" data-value="${ data.value }" ${ data.active ? 'aria-selected="true"' : "" }><span style="margin-right:10px; width:12px; height:12px; background-color:${ data?.customProperties?.color };display:inline-block;vertical-align:middle;margin-top:-2px;"></span>${ data.label }</div>` ); }
So, what is the right defined?
Thanks!
The text was updated successfully, but these errors were encountered:
No branches or pull requests
When I called
callbackOnCreateTemplates
to custom template.But it worked when the code changed to
All attr of classNames are
undefined
. But they are worked in item.So, what is the right defined?
Thanks!
The text was updated successfully, but these errors were encountered: