Skip to content
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

start-y doesn't work when content not tall enough to scroll #743

Closed
calendee opened this issue Mar 7, 2014 · 12 comments
Closed

start-y doesn't work when content not tall enough to scroll #743

calendee opened this issue Mar 7, 2014 · 12 comments
Assignees

Comments

@calendee
Copy link

calendee commented Mar 7, 2014

start-y was added back in January to be able to hide a search box.

http://forum.ionicframework.com/t/ios-mail-app-like-search-box-in-list/508/2

It no longer works:

http://codepen.io/calendee/pen/BpADr and http://codepen.io/ionic/pen/KzswD

@adamdbradley adamdbradley added this to the 1.0 Beta2 milestone Mar 10, 2014
@mlynch mlynch modified the milestones: 1.0 Beta, 1.0 Beta2 Mar 10, 2014
@mlynch
Copy link
Contributor

mlynch commented Mar 10, 2014

This does still work, the issue is that it doesn't work if the content is not high enough to scroll. See this working example: http://codepen.io/ionic/pen/sDdpG

Not sure what to do in this case. I think it should be up to them to handle (by adding a sized empty box). Thoughts?

@mlynch mlynch modified the milestones: 1.0 Beta2, 1.0 Beta Mar 10, 2014
@calendee
Copy link
Author

Hmm…. Not sure other than purposefully making the content bigger than it needs to be when no data exists. Thats not a very good solution.

I agree that any hacks at the framework level are not appropriate and need to be handled by the developer.

@joemcelroy
Copy link

how about if the search box was handled like the refresher for ion-content?

  • Hidden by default
  • pull down to reveal
  • if the search box is partially revealed, snap to either fully shown or completely hidden
  • if the search box is in focus, move to the top of pane ( over any navigation bar )

@dhiva
Copy link

dhiva commented Apr 7, 2014

I have the same issue. The data are loaded from a webservice and I have enough data to have the scroll working but the page is rendered first before the data is populated and I guess it makes the search box appear and start-y doesn't seem to work. Is there a way to fix this or a work around?

@adamdbradley adamdbradley modified the milestones: 1.0.0-beta.3, 1.0.0-beta.2 Apr 30, 2014
@mikestecker
Copy link

+1 having the same issue @dhiva, content is loaded in after the view is rendered

@calendee
Copy link
Author

@dhiva & @mikestecker : You can just keep the search box hidden until after data is loaded from the service then scroll so that it is hidden.

Sample (uses 2 second delay) : http://codepen.io/calendee/pen/pwcGk

@calendee
Copy link
Author

@Phoey @dhiva

Try this sample. It determines if scroll is required. If not, it never shows the search box.

http://codepen.io/calendee/pen/lyeko

Of course, this sample is not particularly elegant. When there is enough data to scroll, you have to wait for the view to render before you can show the scroller and scroll down.

@dhiva
Copy link

dhiva commented May 26, 2014

@calendee
The example you have provided seem to work well. Thanks for the example

@perrygovier
Copy link
Contributor

Not sure how or when, but this is working now. http://codepen.io/perrygovier/pen/iGDJq

@andyfo
Copy link

andyfo commented Nov 27, 2014

The example from @perrygovier (still) wouldn't work with a list shorter than the content height. However you can make it work by setting the .scroll div a fixed height that's the sum of the content height and the search box height (and usually minus the header height).

But even that solution won't work with the collection-repeat.

@4name
Copy link

4name commented Jan 3, 2015

+1 to @zabojnik collection-repeat and start-y doesn't work together.

@ionitron-bot
Copy link

ionitron-bot bot commented Sep 6, 2018

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.

@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Sep 6, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants