-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Keep Placeholder activated in multipleSelect component #1796
Comments
See discussion in #1433 Can you put together a PR with tests for it? |
@user378230 Which approach is better to fix this? Should we move Or, another option is to add
into existing function |
Hi @DmitryGonchar I think it is best to go for the first option. Are you going to make the PR? Thanks. |
@Jefiozie I will have time only at the weekend. Are you sure option 1) will not break some other use cases? Or is it all covered with tests? |
Hi, I would also need this feature for ui-select multiple, I have navigated through the three tickets concerning this feature (the current one, #1433 and #1612). And I am not sure, the feature is present for ui-select non-multiple and not present for ui-select multiple, that's it? I am asking that because I have tried to get this work but didn't managed to. Here is a plunker : http://plnkr.co/edit/u5sNZ77dtaXMht3uTcnw?p=preview |
Any update on that ticket please? |
@Jefiozie what about answers for #1796 (comment)? Option 2 seems to be a safer one if you are not sure |
User can provide their custom `getPlaceholder()` function. E.g. to keep placeholder activated in multipleSelect component, you can use this one: ``` angular.module('myApp').directive('myAppUiSelectPlaceholderAlwaysVisible', function() { return { require: 'uiSelect', link: function($scope, $element, attrs, $select) { $select.getPlaceholder = function () { return $select.placeholder; } } } }); ``` And then add this directive to the `<ui-select>` html element closes angular-ui#1796
@fabioel and others
And then add this directive as an attribute to the Or you can override this function globally, of course |
User can provide their custom `getPlaceholder()` function. E.g. to keep placeholder activated in multipleSelect component, you can use this one: ``` angular.module('myApp').directive('myAppUiSelectPlaceholderAlwaysVisible', function() { return { require: 'uiSelect', link: function($scope, $element, attrs, $select) { $select.getPlaceholder = function () { return $select.placeholder; } } } }); ``` And then add this directive to the `<ui-select>` html element closes angular-ui#1796
Hi @DmitryGonchar thanx for your fix I have tested it locally by copying/pasting your code, and it works well. Any idea when is scheduled the next release with your pull request? This ticket is nearly one year old |
No idea. When @Jefiozie merges it, I am not the maintainer. |
+1 on merging this please. @Jefiozie |
Hello!
I stumbled upon a problem today that is caused by the following lines:
uiSelectMultipleDirective.js
I would like to have my placeholder activated even after I selected the first option in a multiple select component. Is there a plan to refactor this? Maybe to use a property like:
keepPlaceholder
Thanks!
The text was updated successfully, but these errors were encountered: