A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/bootstrap-vue/bootstrap-vue/commit/58e2d7e4f5e883207c4f7baa856532d3ae924a0c below:

retain parent-child relationship for Vue 2 · bootstrap-vue/bootstrap-vue@58e2d7e · GitHub

File tree Expand file treeCollapse file tree 2 files changed

+25

-0

lines changed

Filter options

Expand file treeCollapse file tree 2 files changed

+25

-0

lines changed Original file line number Diff line number Diff line change

@@ -58,4 +58,28 @@ describe('utils/transporter component', () => {

58 58 59 59

expect(target.parentElement).toEqual(null)

60 60

})

61 + 62 +

it('maintains provide-inject relation', async () => {

63 +

const Child = {

64 +

inject: ['foo'],

65 +

render(h) {

66 +

return h('article', this.foo)

67 +

}

68 +

}

69 + 70 +

const App = {

71 +

provide() {

72 +

return { foo: 'foo' }

73 +

},

74 +

render(h) {

75 +

return h(BVTransporter, { props: { disabled: false } }, [h(Child)])

76 +

}

77 +

}

78 + 79 +

mount(App, {

80 +

attachTo: document.body

81 +

})

82 + 83 +

expect(document.querySelector('article').textContent).toBe('foo')

84 +

})

61 85

})

Original file line number Diff line number Diff line change

@@ -3,6 +3,7 @@ export const createNewChildComponent = (parent, Component, config = {}) => {

3 3 4 4

return new Component({

5 5

...config,

6 +

parent,

6 7

bvParent: parent,

7 8

bvEventRoot

8 9

})

You can’t perform that action at this time.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4