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

TableScreen's title_view doesn't work with rmq/redpotion #770

Open
markrickert opened this issue Jan 19, 2016 · 1 comment
Open

TableScreen's title_view doesn't work with rmq/redpotion #770

markrickert opened this issue Jan 19, 2016 · 1 comment

Comments

@markrickert
Copy link
Contributor

I ran into an issue where when setting a title_view: on a table section would actually set the RMQ stylesheet I had set on the screen to nil, causing all sorts of problems for the cells underneath.

I fixed this in my project by doing this in table.rb.

# Section header view methods
def tableView(_, viewForHeaderInSection: index)
  section = promotion_table_data.section(index)
  view = section[:title_view]
  view = section[:title_view].new if section[:title_view].respond_to?(:new)

  # Added the line below to fix the issue...
  view.stylesheet = self.stylesheet if self.stylesheet && view.respond_to?(:stylesheet=)

  view.on_load if view.respond_to?(:on_load)
  view.title = section[:title] if view.respond_to?(:title=)
  view
end

Not sure if we should add this to redpotion or what...

@jamonholmgren
Copy link
Owner

Odd. Yeah, we should probably add this to RedPotion.

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

2 participants