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

Add option for <Spin> to spinning in the center of the visible part of div instead of geometrical center. #4722

Closed
abonec opened this issue Jan 25, 2017 · 9 comments

Comments

@abonec
Copy link

abonec commented Jan 25, 2017

I have a very high table and when processing of this table I activate Spin. But because it is very high table spinner is located in the geometrical center of that table and user can't see it. Can you add an option to show spinner in the center of the visible area instead of geometrical? Or option to disable spinning at all - just to blur the element.

@afc163
Copy link
Member

afc163 commented Jan 25, 2017

You can set style.height of Spin to change spinner position.

http://codepen.io/anon/pen/ggxjor?editors=001

@afc163 afc163 closed this as completed Jan 25, 2017
@abonec
Copy link
Author

abonec commented Jan 25, 2017

I changed this example to real world one where I have long content without predefined height and this approach doesn't work.
http://codepen.io/anon/pen/rjzrKq?editors=001

@afc163
Copy link
Member

afc163 commented Jan 25, 2017

Just fix the height: http://codepen.io/anon/pen/jyLvMv?editors=001

@abonec
Copy link
Author

abonec commented Jan 25, 2017

I see that bottom text is in the wrong position but it doesn't matter because this approach can't show spinner in the position when the user is scrolled.

If user trigger spinner in the middle of that block user won't see it. It should be a dynamic approach in the spinner component by the option.

@afc163
Copy link
Member

afc163 commented Jan 25, 2017

Use className is a better way: http://codepen.io/anon/pen/rjzrKq?editors=0110

@afc163
Copy link
Member

afc163 commented Jan 25, 2017

I will consider that and you can try to propose a PR if you have nice solution.

@abonec
Copy link
Author

abonec commented Jan 25, 2017

I mediocre frontend developer and even worse html\css developer. I just use your nice components.

@afc163 afc163 reopened this Feb 27, 2017
@afc163 afc163 closed this as completed in e008214 Feb 27, 2017
@afc163
Copy link
Member

afc163 commented Feb 27, 2017

Added a max-height limit for big height content.

@lock
Copy link

lock bot commented May 2, 2018

This thread has been automatically locked because it has not had recent activity. Please open a new issue for related bugs and link to relevant comments in this thread.

@lock lock bot locked as resolved and limited conversation to collaborators May 2, 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

2 participants