ProMotion icon indicating copy to clipboard operation
ProMotion copied to clipboard

searchable hide_initially: true - issue with tab bar controller

Open carlinisaacson opened this issue 11 years ago • 9 comments

I am using the hide_initially: true option for searchable in my table views. I discovered that when I open a tab bar with a table screen (open_tab_bar TableScreen.new(nav_bar: true)), the search bar is only hidden halfway. If I just open a table screen (open TableScreen.new(nav_bar: true)) the search bar is hidden all of the way.

It appears that setting contentOffset on a scroll view acts funny inside a tab bar controller.

http://clrsight.co/ci/8xgelzbfw9.png

carlinisaacson avatar Apr 15 '15 22:04 carlinisaacson

Upon further investigation I found that when opening the screen in the tab bar and not setting nav_bar: true

open_tab_bar TableScreen

hide_initially appears to work fine. It seems to only malfunction when there is a nav_bar

carlinisaacson avatar Apr 15 '15 22:04 carlinisaacson

@carlinisaacson You probably want to look here: https://github.com/clearsightstudio/ProMotion/blob/173b412e48e74d37c9e7b86f2abae703f5bdea25/lib/ProMotion/table/table.rb#L49-L51

jamonholmgren avatar Apr 15 '15 22:04 jamonholmgren

@jamonholmgren That is how I figured out it is contentOffset that is behaving oddly in this situation. So why it is behaving oddly is the actual issue that needs to be resolved here I suppose.

carlinisaacson avatar Apr 16 '15 00:04 carlinisaacson

I've had the same problem with the same setup.

andersennl avatar May 23 '15 05:05 andersennl

Did you find out anything new about this? Tables look indeed a little weird with this bug.

andersennl avatar May 29 '15 05:05 andersennl

I don't think we ever did. What did we do, @carlinisaacson ?

jamonholmgren avatar May 29 '15 20:05 jamonholmgren

@jamonholmgren Honestly, I think it worked itself out. Not sure what the change was that fixed it. Then we switched to the custom search bar that you built in that app so we shouldn't have an issue with it anymore.

carlinisaacson avatar May 29 '15 20:05 carlinisaacson

I've updated to the newest version yesterday and the bug is gone. Thanks a lot! :+1:

andersennl avatar May 30 '15 04:05 andersennl

Great!

jamonholmgren avatar May 31 '15 01:05 jamonholmgren