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

feat(removeSelected): Make removeSelected configurable #1567

Closed
wants to merge 8 commits into from

Conversation

dondi
Copy link
Contributor

@dondi dondi commented Apr 19, 2016

Expose the removeSelected property, and adjust isDisabled behavior so that items that would have been removed from a multiple ui-select element because they are currently selected are disabled instead.

Sample behavior:
screen shot 2016-04-18 at 6 07 42 pm

In the existing version, id would not have appeared in the dropdown because it is currently selected. This pull request adds the option removeSelected so that, if set to false, selected items still appear in the dropdown but are disabled (like in the screenshot).

dondi added 6 commits March 23, 2016 14:35
...at the cost of potential unnecessary watches when dropdown is closed.
But the premise is that, until the resulting errors are fixed, the
preference is to avoid the errors for now.

Closes angular-ui#1355
Expose the removeSelected property, and adjust isDisabled behavior
so that items that would have been removed are disabled instead.

Work in progress: This broke some tests
@user378230
Copy link
Contributor

@dondi The code itself looks ok but there aren't any unit tests. Can you add some and I'll review again?

Thanks! 👍

@dondi
Copy link
Contributor Author

dondi commented May 13, 2016

Ack, sorry! I had fixed some unit tests that broke due to this change but then got distracted that day and totally forgot about adding new ones. Sorry, my bad, I will notify you when I’ve put something up.

@thomasmiddeldorp
Copy link

@dondi Is this PR still something you're working on recently? The functionality this PR contains is something I'm looking for as well, so I could take over the PR if it doesn't fit in your schedule =)

@dondi
Copy link
Contributor Author

dondi commented May 24, 2016

Thanks very much for the offer @thomasmiddeldorp 👍 As it turns out, I was chipping away at it and managed to have enough time to wrap things up this morning. Had a learning curve to climb there for a bit. I just pushed both unit tests and a demo—hope it's what you're looking for.

@user378230
Copy link
Contributor

Almost perfect @dondi! Can you just squash down into a single feat(removeSelected) commit? There is a lot of noise in the commit history some of which has been cancelled out.

Once that's done I'll merge 👍

Useful reference: Commit Message Guidelines

@dondi
Copy link
Contributor Author

dondi commented May 25, 2016

Ah OK, I'll look into that…I presume the "merge from master" commit that is in between there is part of this noise. Yeah I can see how that would be problematic. Would it work better if I create a fresh branch off upstream then place my changed files there, do a single commit, and issue a new pull request?

@dondi
Copy link
Contributor Author

dondi commented May 25, 2016

OK, I have a new pull request using a fresh branch that is updated from upstream. Hope that will be OK.

New pull request: #1622

@dondi dondi closed this May 25, 2016
@user378230
Copy link
Contributor

You've opened the new one now but you can just force push to your existing branch after squashing, github would have automatically updated this PR with the new single commit. :-)

@dondi
Copy link
Contributor Author

dondi commented May 27, 2016

Yes, I intended to do that at first, but after looking more closely at the overall commits, there were a couple that were no longer valid plus the merge from master commit was in between commits of mine that I wanted to keep, with potential dependent changes in between. So in the end it was more straightforward to start fresh.

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.

3 participants