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

config/initializers/rails_admin.rb:4:in block in <main>': undefined method horizontal_scroll_list=' for RailsAdmin::Config:Module (NoMethodError) #3032

Closed
syit opened this issue Jun 11, 2018 · 7 comments

Comments

@syit
Copy link

syit commented Jun 11, 2018

I tried this to make the list view table show all of the columns on a single page, with horizontal scrolling and frozen header columns in the table.

RailsAdmin.config do |config|
  ...
  # Use default horizontal scroll settings of 3 frozen columns (checkboxes, links/actions, ID) with a border on the right:
  config.horizontal_scroll_list = true

  # Use horizontal scrolling, but without any frozen columns:
  config.horizontal_scroll_list = {num_frozen_columns: 0}

But getting error
/config/initializers/rails_admin.rb:4:in block in

': undefined method horizontal_scroll_list=' for RailsAdmin::Config:Module (NoMethodError)

rails_admin (1.3.0)

@mltsy
Copy link

mltsy commented Oct 12, 2018

I'm also not able to use horizontal_scroll_list in 1.4.1 ...

@patleb
Copy link

patleb commented Oct 20, 2018

A bit confuse here... there's a PR which isn't merged, so why open an issue saying that a feature (which doesn't exist) doesn't work?

@mltsy
Copy link

mltsy commented Oct 22, 2018

Good point - sorry, apparently I didn't read the documentation closely enough! I didn't realize it wasn't a merged feature yet.

I was also having trouble getting total_columns_width to do anything, which is why I quickly tried horizontal_scroll_list when I saw it was an option. But I guess total_columns_width is unrelated to this issue, so I'll create a new one for that if I try again and still can't get it to work (I just have a bunch of checkbox fields that should really fit on one screen, but I can't get them to all show up)

@patleb
Copy link

patleb commented Oct 22, 2018

You will have to play with column_width also, since its default is 120px. So if you have 10 columns, than you need total_columns_width at 1200px.

@mltsy
Copy link

mltsy commented Oct 22, 2018

Hey, I figured it out! (I think I was actually just setting it in the wrong place - or a couple of wrong places, actually) 😄 Thanks!

@patleb
Copy link

patleb commented Oct 22, 2018

👍

@mshibuya
Copy link
Member

mshibuya commented May 2, 2019

#3017 is in the master now.

@mshibuya mshibuya closed this as completed May 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants