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

fix(uiSelectMatch): set model value to null when cleared #1959

Merged

Conversation

jrbotros
Copy link

@jrbotros jrbotros commented Apr 5, 2017

Closes #863

@@ -636,6 +639,31 @@ describe('ui-select tests', function () {
expect(el.find('.select2-search-choice-close').length).toEqual(1);
});

it('should clear selection (with object as source)', function() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you maybe make use of createUISelect and /or createUIMultipleSelect function in the tests?

Copy link
Author

@jrbotros jrbotros Apr 11, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The main should clear selection test above still uses createUISelect, but I didn't see a way to test the "object as source" syntax without compiling the template manually (I used the should bind model correctly (with object as source) test as a template). Any ideas how to make this cleaner?

Copy link
Contributor

@Jefiozie Jefiozie Apr 11, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah missed that yeah hmm.. maybe we could make a new function createUiSelectObjectSource or some other good name where the template is build and can be used in the future?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's get this landed and open another issue for doing some test cleanup? Happy to take a stab at it in a few days (probably over the weekend)!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe it is best I want to do some major refactoring to this repo, for example it needs to have seperate directives for tagging etc.

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 inner comments 👍

@Jefiozie Jefiozie added this to the v0.19.6 milestone Apr 10, 2017
@Jefiozie Jefiozie merged commit adf0e39 into angular-ui:master Apr 12, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants