@@ -37,6 +37,12 @@ via the `modal-header` slot, and override the footer completely via the `modal-f
3737present. Also, if you use the ` modal-header ` slot, the default header ` X ` close button will not be
3838present, nor can you use the ` modal-title ` slot.
3939
40+ <span class =" badge badge-warning small " >CHANGED in 2.0.0-rc.20</span > Modals will not render their
41+ content in the document until they are shown (lazily rendered). Modals, when visible, are rendered
42+ ** appended to the ` <body> ` element** . The placement of the ` <b-modal> ` component will not affect layout,
43+ as it always renders as a placeholder comment node (` <!----> ` ). You can revert to the behaviour of
44+ previous BootstrapVue versions via the use of the [ ` static ` prop] ( #lazy-loading-and-static-modals ) .
45+
4046## Toggle modal visibility
4147
4248There are several methods that you can employ to toggle the visibility of ` <b-modal> ` .
@@ -144,6 +150,9 @@ methods.
144150The ` hide() ` method accepts an optional string ` trigger ` argument for defining what triggered the
145151modal to close. See section [ Prevent Closing] ( #prevent-closing ) below for details.
146152
153+ ** Note:** It is reccomended to use the ` this.$bvModal.show() ` and ` this.$bvModal.hide() ` methods
154+ (mentioned in the previous section) instead of using ` $ref ` methods.
155+
147156### Using ` v-model ` property
148157
149158` v-model ` property is always automatically synced with ` <b-modal> ` visible state and you can
@@ -171,7 +180,7 @@ show/hide using `v-model`.
171180<!-- b-modal-v-model.vue -->
172181```
173182
174- When using the ` v-model ` property, do not use the ` visible ` property at the same time.
183+ When using the ` v-model ` prop, ** do not** use the ` visible ` prop at the same time.
175184
176185### Using scoped slot scope methods
177186
@@ -214,6 +223,9 @@ export default {
214223}
215224```
216225
226+ ** Note:** It is reccomended to use the ` this.$bvModal.show() ` and ` this.$bvModal.hide() ` methods
227+ (mentioned in a previous section) instead of emitting ` $root ` events.
228+
217229### Prevent closing
218230
219231To prevent ` <b-modal> ` from closing (for example when validation fails). you can call the
@@ -366,23 +378,23 @@ are appended by specifying a container ID (refer to tooltip and popover docs for
366378
367379## Lazy loading and static modals
368380
369- <span class =" badge badge-info small " >ENHANCED in 2.0.0-rc.20</span >
381+ <span class =" badge badge-info small " >NEW in 2.0.0-rc.20</span >
370382
371383By default, modals will not render their content in the document until they are shown (lazily
372- rendered). Modals that are visible are rendered appended to the ` <body> ` element (via the use of
373- [ PortalVue ] ( https://portal-vue.linusb.org/ ) ) inside a modal target ` <div> ` when they are visible.
374- ` <b-modal> ` components will not affect layout, as they render as a placeholder comment node
375- ( ` <!----> ` ) .
384+ rendered). Modals that, when visible, are rendered appended to the ` <body> ` element. The ` <b-modal> `
385+ component will not affect layout, as they render as a placeholder comment node ( ` <!----> ` ) in the
386+ DOM position they are placed. Due to the portalling process, it can take two or more ` $nextTick ` s to
387+ render changes of the content into the target .
376388
377- Modals can be rendered _ in-place_ in the document, where the ` <b-modal> ` component is placed in the
378- document, by setting the ` static ` prop to ` true ` . Note that the content of the modal will be
389+ Modals can be rendered _ in-place_ in the document (i.e. where the ` <b-modal> ` component is placed in
390+ the document) by setting the ` static ` prop to ` true ` . Note that the content of the modal will be
379391rendered in the DOM even if the modal is not visible/shown when ` static ` is ` true ` . To make ` static `
380392modals lazy rendered, also set the ` lazy ` prop to ` true ` . The modal will then appear in the
381393document _ only_ when it is visible. Note, when in ` static ` mode, placement of the ` <b-modal> `
382- component may affect layout of your document and the modal.
394+ component _ may affect layout _ of your document and the modal.
383395
384396The ` lazy ` prop will have no effect if the prop ` static ` is not ` true ` (non-static modals will
385- always be lazily rendered).
397+ _ always _ be lazily rendered).
386398
387399## Styling, options, and customization
388400
0 commit comments