Support

Search results for ""

Sorry, no results found. Perhaps you would like to search the documentation?
All Topics
Keith

filter to turn on Horizontal Scroll by default?

Hello!

We have lots of new Users… and when they login, they get a scrunched table of data because we have LOTS of columns. The solution of course is to turn on Horizontal Scrolling. Is there a way to get that turned on by default?

Thanks!

7 years, 2 months ago
Stefan van den Dungen Gronovius
Developer

Hi Keith,

Our horizontal scrolling feature just adds a class acp-overflow-table to the body.
So if you always want horizontal scrolling enabled, you can do that by adding the class to the body. This snippet adds the class to the body tag.

function acp_overflow_table_class( $classes ) {
	$classes .= ' acp-overflow-table ';

	return $classes;
}

add_filter( 'admin_body_class', 'acp_overflow_table_class' );
7 years, 2 months ago
Keith

Nice! Thanks Stefan

7 years, 2 months ago
Stefan van den Dungen Gronovius
Developer

You’re welcome.
This snippet always enable horizontal scrolling and it will ignore the user settings.
So a user cannot overwrite this, keep that in mind. I will close this ticket.

7 years, 2 months ago
Vela Agency

I have this same need with he exception that I do not want to override the user’s choice, just have Horizontal Scrolling selected as the default state. Can that be accomplished?

6 years, 9 months ago
Stefan van den Dungen Gronovius
Developer

It’s not possible to set this behavior to enabled by default and also keeps the user’s choice into account.
The reason is that this preference is stored per user per list screen per column set. We could add a filter for this setting, but that would probably still not accommodate your request that you want to keep the users choice.

6 years, 9 months ago

You must be logged in to reply to this topic.