Skip to content

Commit 2c303cd

Browse files
committed
Fixed a bug that was updating the state twice in the binding process to the parent direction.
Changed not to export state. (use view.state) TODO: The number of errors in the form with diagnostic count in the initial state is not reflected.
1 parent 0e29726 commit 2c303cd

File tree

4 files changed

+69
-162
lines changed

4 files changed

+69
-162
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -341,13 +341,13 @@ onMounted(() => {
341341

342342
| Function / Parameter | Description |
343343
| -------------------- | --------------------------------------------------------------------------------------------------- |
344+
| view | Get and set [EditorView](https://codemirror.net/docs/ref/#view.EditorView). |
344345
| selection | Get and set the [EditorSelection](https://codemirror.net/docs/ref/#state.EditorSelection) instance. |
345346
| cursor | Get and set the [cursor](https://codemirror.net/docs/ref/#state.EditorSelection^cursor) location. |
346-
| state | Get and set [EditorState](https://codemirror.net/docs/ref/#state.EditorState). |
347347
| json | Get and set state to a JSON-serializable object. |
348348
| focus | Get and set [focus](https://codemirror.net/docs/ref/#view.EditorView.focus). |
349-
| lint | Force run linter (Only if `linter` prop is specified) |
350-
| forceReconfigure | Re register all extensions. |
349+
| lint() | Force run linter (Only if `linter` prop is specified) |
350+
| forceReconfigure() | Re register all extensions. |
351351

352352
### CodeMirror5 backward compatible functions
353353

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"$schema": "https://json.schemastore.org/package.json",
33
"name": "vue-codemirror6",
4-
"version": "1.1.17.beta",
4+
"version": "1.1.17",
55
"license": "MIT",
66
"description": "CodeMirror6 Component for vue2 and vue3.",
77
"keywords": [

src-docs/components/LinterAndCrossBindingDemo.vue

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,6 @@ const linter: LintSource = esLint(
4242
},
4343
}
4444
);
45-
46-
/** Get ViewUpdate for update lint error count. */
47-
const onUpdate = (update: ViewUpdate) => {
48-
errorCount.value = diagnosticCount(update.state);
49-
};
5045
</script>
5146

5247
<!-- eslint-disable vuejs-accessibility/label-has-for -->
@@ -63,7 +58,6 @@ const onUpdate = (update: ViewUpdate) => {
6358
class="mb-3"
6459
gutter
6560
wrap
66-
@Update="onUpdate"
6761
/>
6862
<div class="row mb-3">
6963
<div class="col-6">

0 commit comments

Comments
 (0)