Skip to content
This repository has been archived by the owner on Sep 5, 2024. It is now read-only.

fix(virtualRepeat): sets initial size for virtual repeat when the fir… #6139

Closed
wants to merge 1 commit into from

Conversation

robertmesserle
Copy link
Contributor

…st results require shrinking

closes #5826

@robertmesserle
Copy link
Contributor Author

@jelbourn @kseamon

@@ -243,7 +243,7 @@ VirtualRepeatContainerController.prototype.sizeScroller_ = function(size) {
VirtualRepeatContainerController.prototype.autoShrink_ = function(size) {
var shrinkSize = Math.max(size, this.autoShrinkMin * this.repeater.getItemSize());
if (this.autoShrink && shrinkSize !== this.size) {
if (shrinkSize < (this.originalSize || this.size)) {
if (shrinkSize < (this.originalSize || this.size) || !(this.originalSize || this.size)) {
Copy link
Member

Choose a reason for hiding this comment

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

Needs a unit test

Copy link
Member

Choose a reason for hiding this comment

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

Would it work if it was just

if (shrinkSize < (this.originalSize || this.size) || !(this.originalSize))

?

Copy link
Contributor

Choose a reason for hiding this comment

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

That does have a different meaning, but the way that looks is still pretty awkward.

@robertmesserle robertmesserle force-pushed the rmesserle/virtual-repeater-sizing-fix branch 2 times, most recently from bd4c15a to 41d25fa Compare December 8, 2015 23:41
@robertmesserle robertmesserle force-pushed the rmesserle/virtual-repeater-sizing-fix branch from 41d25fa to 2f5d786 Compare December 8, 2015 23:56
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.

md-autocomplete in md-dialog have huge height also with only few values
3 participants