Skip to content
This repository was archived by the owner on Oct 2, 2019. It is now read-only.

Conversation

felixmosh
Copy link
Contributor

This feature allows to add header & footer to the dropdowns for each of the default templates.

image

select2

selectize

@felixmosh
Copy link
Contributor Author

Any updates?

@okolomiets
Copy link

The feature seems to become very expected one. Could anyone to review and merge it within next release? Thanks in advance.

@Jefiozie
Copy link
Contributor

Jefiozie commented Jun 5, 2017

It is on the list. Only problem is I don't have a lot of time at the moment.
When I find the time I will do the review and then it will be there in next release.

@Jefiozie Jefiozie mentioned this pull request Jun 5, 2017
Copy link
Contributor

@Jefiozie Jefiozie left a 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);
Copy link
Contributor

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.

Copy link
Contributor Author

@felixmosh felixmosh Jul 1, 2017

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',
Copy link
Contributor

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?

Copy link
Contributor Author

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',
Copy link
Contributor

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?

Copy link
Contributor Author

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) {
Copy link
Contributor

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.

Copy link
Contributor Author

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);
Copy link
Contributor

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?

Copy link
Contributor Author

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...

@trosenfeld
Copy link

Just a comment:
As I was looking to use this feature I had made a local copy with these modifications.
When using the header and/or footer feature the options area in the dropdown no longer scrolls.
This is fairly annoying as the whole list of options is displayed which "elongates" the site when opening the dropdown. (We have lists of sometimes over 200 items)
You might also want to look into this when/if you get the time before releasing.

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.

@felixmosh
Copy link
Contributor Author

felixmosh commented Jul 26, 2017

@trosenfeld, did u copied the styles as well?
Can u try to clone the PR, and run it locally.
I will be happy to look into your copy, to figure out what is wrong with it.

@felixmosh
Copy link
Contributor Author

@Jefiozie any updates?

@GeneGenie
Copy link

So. when it will be available?

@felixmosh
Copy link
Contributor Author

It depends on the author, he from some reason not approves it :/

@Jefiozie Jefiozie merged commit d1ce1cf into angular-ui:master Oct 21, 2017
@shyamal890
Copy link

@bpaugam
Copy link

bpaugam commented Feb 9, 2018

When will this be released ?

@besafx
Copy link

besafx commented May 9, 2018

Can You Give Us A Code That We Can Add Into Select.JS to Enable This Feather

@pavel-blagodov
Copy link

Does anybody work on this repo? No commits since Mar 5

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

Successfully merging this pull request may close these issues.

9 participants