-
Notifications
You must be signed in to change notification settings - Fork 1.8k
feat(Header & Footer): Add header & footer to the dropdown list - iteration 2. #1982
Conversation
aaaff5a
to
96771a2
Compare
Any updates? |
The feature seems to become very expected one. Could anyone to review and merge it within next release? Thanks in advance. |
It is on the list. Only problem is I don't have a lot of time at the moment. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See my comments on the code.
|
||
box-shadow: 0 -4px 8px rgba(0, 0, 0, 0.25); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you change the spacing on this file? Looks like a lot of changes have been made but it are just spaces.
thanks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The spacing at the PR are the correct ones, pay attention, there is inconstant spacing at the original file... I've just formatted it to be aligned.
var theme = tElement.parent().attr('theme') || uiSelectConfig.theme; | ||
return theme + '/footer.tpl.html'; | ||
}, | ||
restrict: 'EA', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should it match also the attribute
tag? Or only the element
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It can be both
var theme = tElement.parent().attr('theme') || uiSelectConfig.theme; | ||
return theme + '/header.tpl.html'; | ||
}, | ||
restrict: 'EA', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should it match also the attribute
tag? Or only the element
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It can be both
|
||
var el; | ||
|
||
function setupSelectComponent(theme, isMulti) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have 2 functions for building up the template createUitSelect
and createUiSelectMultiple
. I believe this functions can be changed to support theses tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, but it doesn't have the header
& footer
tags...
describe(theme + ' theme', function () { | ||
it('should show the header', function () { | ||
setupSelectComponent(theme); | ||
expect($(el).find('.ui-select-header').text().trim()).toBe(scope.selection.selected.name); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are your trimming the text? Is there any reason for it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cause it is a text in html element, and it can contain spaces...
Just a comment: For now I'm just using the "master" ui-select and adding "disabled" items to the select items list using the "ui-disable-choice" attribute on "ui-select-choices" to prevent selection. |
@trosenfeld, did u copied the styles as well? |
@Jefiozie any updates? |
So. when it will be available? |
It depends on the author, he from some reason not approves it :/ |
@Jefiozie May be we should update this: https://github.com/angular-ui/ui-select/wiki/ui-select-header-and-footer |
When will this be released ? |
Can You Give Us A Code That We Can Add Into Select.JS to Enable This Feather |
Does anybody work on this repo? No commits since Mar 5 |
This feature allows to add header & footer to the dropdowns for each of the default templates.