File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed
Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -193,6 +193,7 @@ AppRegistry.registerComponent('myproject', () => swiper);
193193| style | {...} | ` style ` | See default style in source. |
194194| loadMinimal | false | ` bool ` | Only load current index slide , ` loadMinimalSize ` slides before and after. |
195195| loadMinimalSize | 1 | ` number ` | see ` loadMinimal ` |
196+ | loadMinimalLoader | ` <ActivityIndicator /> ` | ` element ` | Custom loader to display when slides aren't loaded
196197
197198#### Pagination
198199
Original file line number Diff line number Diff line change @@ -112,6 +112,7 @@ export default class extends Component {
112112 showsButtons : PropTypes . bool ,
113113 loadMinimal : PropTypes . bool ,
114114 loadMinimalSize : PropTypes . number ,
115+ loadMinimalLoader : PropTypes . element ,
115116 loop : PropTypes . bool ,
116117 autoplay : PropTypes . bool ,
117118 autoplayTimeout : PropTypes . number ,
@@ -605,7 +606,11 @@ export default class extends Component {
605606 i <= ( index + loopVal + props . loadMinimalSize ) ) {
606607 return < View style = { pageStyle } key = { i } > { children [ page ] } </ View >
607608 } else {
608- return < View style = { pageStyleLoading } key = { `loading-${ i } ` } > < ActivityIndicator /> </ View >
609+ return (
610+ < View style = { pageStyleLoading } key = { `loading-${ i } ` } >
611+ { props . loadMinimalLoader ? props . loadMinimalLoader : < ActivityIndicator /> }
612+ </ View >
613+ ) ;
609614 }
610615 } else {
611616 return < View style = { pageStyle } key = { i } > { children [ page ] } </ View >
@@ -629,4 +634,4 @@ export default class extends Component {
629634 </ View >
630635 )
631636 }
632- }
637+ }
You can’t perform that action at this time.
0 commit comments