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

feat(typeahead): added clear button - all in one commit #6189

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

shootermv
Copy link

No description provided.

@@ -162,6 +162,7 @@ angular.module('ui.bootstrap.typeahead', ['ui.bootstrap.debounce', 'ui.bootstrap

//pop-up element used to display matches
var popUpEl = angular.element('<div uib-typeahead-popup></div>');
var clearBtnEl = angular.element('<span class="glyphicon glyphicon-remove" ng-style="{ cursor:\'pointer\',position:\'absolute\',top:positionClearBtn.top+\'px\', left:positionClearBtn.left+\'px\'}" ng-show="showClearBtn" ng-click="clearModel()"></span>');
Copy link
Contributor

@wesleycho wesleycho Aug 21, 2016

Choose a reason for hiding this comment

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

It would be nicer to change this to something similar to how the popUpEl attributes are added (just the line below), i.e.

var clearBtnEl = angular.element('<span></span>');
clearBtnEl.attr({
  class: 'glyphicon glyphicon-remove',
  style: 'position: absolute; cursor: pointer;',
  'ng-style': '...',
  ...
});

@wesleycho
Copy link
Contributor

Labeling this as a breaking change not because of an actual library breaking change, but one that changes UX.

@shootermv
Copy link
Author

Hi Wesley.
Changed the way of adding clearBtn element to be like the way popupElem
added.
Hope it is good
Thanks

On Sun, Aug 21, 2016 at 5:27 PM, Wesley Cho notifications@github.com
wrote:

Labeling this as a breaking change not because of an actual library
breaking change, but one that changes UX.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#6189 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABRmHjPBdRzE0j_RXs-Yl37WFWLMhGKrks5qiGA9gaJpZM4JpSjI
.

http://gs500coder.blogspot.com

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.

2 participants