Problem getting subheader to show/hide on scroll on device/emulator

I’ve been trying to get this codepen example to work on my iOS device and emulator all day.

Nothing happens on the device when I scroll and there is a top padding before the list. When I run it with ionic serve it’s fine, also works as it should in the mobile browser.

Can anyone get it to work?