Skip to content

Commit a02ab76

Browse files
authored
Merge branch 'dev' into tmorehouse/input-lazy
2 parents 46cd524 + 676e62a commit a02ab76

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed

docs/plugins/play.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,9 @@ const processExamples = (el, binding, vnode, oldVnode) => {
118118
// Add editable class
119119
pre.classList.add(CLASS_NAMES.editable)
120120

121+
// Store "previous" content on pre element
122+
pre.$_v_play_content = pre.textContent.trim()
123+
121124
// Initial load
122125
let vm = createVM(name, pre, vnode)
123126

@@ -134,9 +137,20 @@ const processExamples = (el, binding, vnode, oldVnode) => {
134137
pre.onblur = () => {
135138
// Re-highlight
136139
hljs.highlightBlock(pre)
140+
// Store "previous" content on pre element
141+
pre.$_v_play_content = pre.textContent.trim()
137142
}
138143

139144
pre.onkeyup = debounce(() => {
145+
const newContent = pre.textContent.trim()
146+
if (pre.$_v_play_content === newContent) {
147+
// Early exit if no changes to content
148+
return
149+
}
150+
151+
// Store "previous" content on pre element
152+
pre.$_v_play_content = newContent
153+
140154
// Recreate VM
141155
destroyVM(name, vm)
142156
vm = createVM(name, pre, vnode)

src/components/table/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1521,8 +1521,8 @@ three classes (depending on which mode is in use) on the `<table>` element:
15211521
- `b-table-select-range`
15221522

15231523
When at least one row is selected, the class `b-table-selecting` will be active on the `<table>`
1524-
element. Rows that are selected rows will have a class of `b-row-selected` applied to the `<tr>`
1525-
element.
1524+
element. Rows that are selected rows will have a class of `b-table-row-selected` applied to the
1525+
`<tr>` element.
15261526

15271527
Use the prop `selected-variant` to apply a Bootstrap theme color to the selected row(s). Note, due
15281528
to the order that the table variants are defined in Bootstrap's CSS, any row-variant _might_ take

0 commit comments

Comments
 (0)