2

In ScalaJs, I want to use justifyContent and alignItems style attribute but when I do it through normal style it says:

ScrollView child layout (["alignItems", "justifyContent"]) must be applied through the contentContainerStyle prop.

def render() = {

    ScrollView(style = UniversalStyleSheet.style(attribute = "value"))(
        .
        .
        .
    )
  }

Please share some code if possible

Vladyslav Zavalykhatko
  • 15,202
  • 8
  • 65
  • 100
Taimur
  • 39
  • 6

1 Answers1

1

You can simply pass contentContainerStyle={styles.contentContainer} to the ScrollView.

https://facebook.github.io/react-native/docs/scrollview.html#contentcontainerstyle

Owen F
  • 66
  • 6
  • I appreciate your answer Owen but I need this in ScalaJs – Taimur May 02 '17 at 07:13
  • I'm not familiar with scala but could you not pass the `contentContainerStyle` prop in the `ScrollView` method instead of `style`? – Owen F May 02 '17 at 07:45