-
-
Notifications
You must be signed in to change notification settings - Fork 900
New issue
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
Customizable SelectionModel #784
Conversation
@@ -99,6 +100,7 @@ export class NgSelectComponent implements OnDestroy, OnChanges, AfterViewInit, C | |||
@Input() searchFn = null; | |||
@Input() clearSearchOnAdd = true; | |||
@Input() labelForId = null; | |||
@Input() selectionModel: SelectionModel = new DefaultSelectionModel(); |
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.
Add this input to readme
@@ -99,6 +100,7 @@ export class NgSelectComponent implements OnDestroy, OnChanges, AfterViewInit, C | |||
@Input() searchFn = null; | |||
@Input() clearSearchOnAdd = true; | |||
@Input() labelForId = null; | |||
@Input() selectionModel: SelectionModel = new DefaultSelectionModel(); |
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.
I think this should be done differently and you shouldn't pass implementation through input.
You can create abstract class which will serve as your DI token with default implementation. This way you could inject your custom implementation.
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.
Ok
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.
But this has to be done carefully to avoid the bug introduced in release 2.7.0 which binds all ng-select together (cf #787)
closing in favor of #785 |
No description provided.