src/sap.m/src/sap/m/GrowingEnablement.js
function(bLoading) {
			var oTrigger = this._oTrigger,
				oControl = this._oControl;

			// If there are no visible columns then also hide the trigger.
			if (!oTrigger || !oControl || !oControl.shouldRenderItems() || !oControl.getDomRef()) {
				return;
			}

			var oBinding = oControl.getBinding("items");
			if (!oBinding) {
				return;
			}

			// update busy state
			oTrigger.setBusy(bLoading);
			oTrigger.$().toggleClass("sapMGrowingListBusyIndicatorVisible", bLoading);

			if (bLoading) {
				oTrigger.setActive(false);
				oControl.$("triggerList").css("display", "");
			} else {
				var aItems = oControl.getItems(true),
					iItemsLength = aItems.length,
					iBindingLength = oBinding.getLength() || 0,
					bLengthFinal = oBinding.isLengthFinal(),
					bHasScrollToLoad = oControl.getGrowingScrollToLoad(),
					oTriggerDomRef = oTrigger.getDomRef();

				// put the focus to the newly added item if growing button is pressed
				if (oTriggerDomRef && oTriggerDomRef.contains(document.activeElement)) {
					(aItems[this._iLastItemsCount] || oControl).focus();
				}

				// show, update or hide the growing button
				if (!iItemsLength || !this._iLimit ||
					(bLengthFinal && this._iLimit >= iBindingLength) ||
					(bHasScrollToLoad && this._getHasScrollbars())) {
					oControl.$("triggerList").css("display", "none");
				} else {
					if (bLengthFinal) {
						oControl.$("triggerInfo").css("display", "block").text(this._getListItemInfo());
					}

					oTrigger.$().removeClass("sapMGrowingListBusyIndicatorVisible");
					oControl.$("triggerList").css("display", "");
				}

				// store the last item count to be able to focus to the newly added item when the growing button is pressed
				this._iLastItemsCount = this._oControl.getItems(true).length;

				// at the beginning we should scroll to last item
				if (bHasScrollToLoad && this._oScrollPosition === undefined && oControl.getGrowingDirection() == ListGrowingDirection.Upwards) {
					this._oScrollPosition = {
						left : 0,
						top : 0
					};
				}

				// scroll to last position
				if (iItemsLength > 0 && this._oScrollPosition) {
					var oScrollDelegate = this._oScrollDelegate,
						oScrollPosition = this._oScrollPosition;

					oScrollDelegate.scrollTo(oScrollPosition.left, oScrollDelegate.getScrollHeight() - oScrollPosition.top);
					this._oScrollPosition = null;
				}
			}
		}
function(bLoading) {
			var oTrigger = this._oTrigger,
				oControl = this._oControl;

			// If there are no visible columns then also hide the trigger.
			if (!oTrigger || !oControl || !oControl.shouldRenderItems() || !oControl.getDomRef()) {
				return;
			}

			var oBinding = oControl.getBinding("items");
			if (!oBinding) {
				return;
			}

			// update busy state
			oTrigger.setBusy(bLoading);
			oTrigger.$().toggleClass("sapMGrowingListBusyIndicatorVisible", bLoading);

			if (bLoading) {
				oTrigger.setActive(false);
				oControl.$("triggerList").css("display", "");
			} else {
				var aItems = oControl.getItems(true),
					iItemsLength = aItems.length,
					iBindingLength = oBinding.getLength() || 0,
					bLengthFinal = oBinding.isLengthFinal(),
					bHasScrollToLoad = oControl.getGrowingScrollToLoad(),
					oTriggerDomRef = oTrigger.getDomRef();

				// put the focus to the newly added item if growing button is pressed
				if (oTriggerDomRef && oTriggerDomRef.contains(document.activeElement)) {
					(aItems[this._iLastItemsCount] || oControl).focus();
				}

				// show, update or hide the growing button
				if (!iItemsLength || !this._iLimit ||
					(bLengthFinal && this._iLimit >= iBindingLength) ||
					(bHasScrollToLoad && this._getHasScrollbars())) {
					oControl.$("triggerList").css("display", "none");
				} else {
					if (bLengthFinal) {
						oControl.$("triggerInfo").css("display", "block").text(this._getListItemInfo());
					}

					oTrigger.$().removeClass("sapMGrowingListBusyIndicatorVisible");
					oControl.$("triggerList").css("display", "");
				}

				// store the last item count to be able to focus to the newly added item when the growing button is pressed
				this._iLastItemsCount = this._oControl.getItems(true).length;

				// at the beginning we should scroll to last item
				if (bHasScrollToLoad && this._oScrollPosition === undefined && oControl.getGrowingDirection() == ListGrowingDirection.Upwards) {
					this._oScrollPosition = {
						left : 0,
						top : 0
					};
				}

				// scroll to last position
				if (iItemsLength > 0 && this._oScrollPosition) {
					var oScrollDelegate = this._oScrollDelegate,
						oScrollPosition = this._oScrollPosition;

					oScrollDelegate.scrollTo(oScrollPosition.left, oScrollDelegate.getScrollHeight() - oScrollPosition.top);
					this._oScrollPosition = null;
				}
			}
		}
function ( bLoading ) { var oTrigger = this . _oTrigger , oControl = this . _oControl ; // If there are no visible columns then also hide the trigger. if ( ! oTrigger || ! oControl || ! oControl . shouldRenderItems ( ) || ! oControl . getDomRef ( ) ) { return ; } var oBinding = oControl . getBinding ( "items" ) ; if ( ! oBinding ) { return ; } // update busy state oTrigger . setBusy ( bLoading ) ; oTrigger . $ ( ) . toggleClass ( "sapMGrowingListBusyIndicatorVisible" , bLoading ) ; if ( bLoading ) { oTrigger . setActive ( false ) ; oControl . $ ( "triggerList" ) . css ( "display" , "" ) ; } else { var aItems = oControl . getItems ( true ) , iItemsLength = aItems . length , iBindingLength = oBinding . getLength ( ) || 0 , bLengthFinal = oBinding . isLengthFinal ( ) , bHasScrollToLoad = oControl . getGrowingScrollToLoad ( ) , oTriggerDomRef = oTrigger . getDomRef ( ) ; // put the focus to the newly added item if growing button is pressed if ( oTriggerDomRef && oTriggerDomRef . contains ( document . activeElement ) ) { ( aItems [ this . _iLastItemsCount ] || oControl ) . focus ( ) ; } // show, update or hide the growing button if ( ! iItemsLength || ! this . _iLimit || ( bLengthFinal && this . _iLimit >= iBindingLength ) || ( bHasScrollToLoad && this . _getHasScrollbars ( ) ) ) { oControl . $ ( "triggerList" ) . css ( "display" , "none" ) ; } else { if ( bLengthFinal ) { oControl . $ ( "triggerInfo" ) . css ( "display" , "block" ) . text ( this . _getListItemInfo ( ) ) ; } oTrigger . $ ( ) . removeClass ( "sapMGrowingListBusyIndicatorVisible" ) ; oControl . $ ( "triggerList" ) . css ( "display" , "" ) ; } // store the last item count to be able to focus to the newly added item when the growing button is pressed this . _iLastItemsCount = this . _oControl . getItems ( true ) . length ; // at the beginning we should scroll to last item if ( bHasScrollToLoad && this . _oScrollPosition === undefined && oControl . getGrowingDirection ( ) == ListGrowingDirection . Upwards ) { this . _oScrollPosition = { left : 0 , top : 0 } ; } // scroll to last position if ( iItemsLength > 0 && this . _oScrollPosition ) { var oScrollDelegate = this . _oScrollDelegate , oScrollPosition = this . _oScrollPosition ; oScrollDelegate . scrollTo ( oScrollPosition . left , oScrollDelegate . getScrollHeight ( ) - oScrollPosition . top ) ; this . _oScrollPosition = null ; } } }
updates the trigger state
updates the trigger state