File tree Expand file tree Collapse file tree 3 files changed +7
-5
lines changed Expand file tree Collapse file tree 3 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ class Viewport extends BaseViewport {
3131 async onLoadGridContainerButtonClick ( data ) {
3232 data . component . disabled = true ;
3333
34- let items = await this . loadItems ( '../../examples/serverside/gridContainer/resources/data/grid-container.json' ) ;
34+ let items = await this . loadItems ( { url : '../../examples/serverside/gridContainer/resources/data/grid-container.json' } ) ;
3535
3636 this . getReference ( 'container' ) . add ( items )
3737 }
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ class Viewport extends BaseViewport {
3030 async onLoadItemsButtonClick ( data ) {
3131 data . component . disabled = true ;
3232
33- let items = await this . loadItems ( '../../examples/serverside/toolbarItems/resources/data/toolbar-items.json' ) ;
33+ let items = await this . loadItems ( { url : '../../examples/serverside/toolbarItems/resources/data/toolbar-items.json' } ) ;
3434
3535 this . getReference ( 'toolbar' ) . add ( items )
3636 }
Original file line number Diff line number Diff line change @@ -586,11 +586,13 @@ class Container extends Component {
586586 * {"modules": [], "items": []}
587587 * See: https://github.com/neomjs/neo/blob/dev/examples/serverside/gridContainer/resources/data/grid-container.json
588588 * It is important to add modules which are not already imported inside your app yet.
589- * @param {String } url
589+ * @param {Object } data
590+ * @param {Object } [data.options={}]
591+ * @param {String } data.url
590592 * @returns {Promise<Object[]> }
591593 */
592- async loadItems ( url ) {
593- let response = await fetch ( url ) ,
594+ async loadItems ( { options = { } , url} ) {
595+ let response = await fetch ( url , options ) ,
594596 remoteData = await response . json ( ) ;
595597
596598 if ( remoteData . modules ?. length > 0 ) {
You can’t perform that action at this time.
0 commit comments