Skip to content

Commit 1938e41

Browse files
authored
feat(Vditor): support bind value (#745)
* feat: 支持双向绑定 * chore: bump version 10.0.1
1 parent 1423d1f commit 1938e41

2 files changed

Lines changed: 8 additions & 3 deletions

File tree

src/components/BootstrapBlazor.Vditor/BootstrapBlazor.Vditor.csproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
<Project Sdk="Microsoft.NET.Sdk.Razor">
22

3+
<PropertyGroup>
4+
<Version>10.0.1</Version>
5+
</PropertyGroup>
6+
37
<PropertyGroup>
48
<PackageTags>Bootstrap Blazor WebAssembly wasm UI Components Vditor Markdown</PackageTags>
59
<Description>Bootstrap UI components extensions of Vditor Markdown</Description>

src/components/BootstrapBlazor.Vditor/Vditor.razor.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (c) Argo Zhang (argo@163.com). All rights reserved.
1+
// Copyright (c) BootstrapBlazor & Argo Zhang (argo@live.ca). All rights reserved.
22
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
33
// Website: https://www.blazor.zone or https://argozhang.github.io/
44

@@ -237,10 +237,11 @@ public async Task TriggerRenderedAsync()
237237
[JSInvokable]
238238
public async Task TriggerInputAsync(string value)
239239
{
240+
_lastValue = value;
241+
CurrentValue = value;
242+
240243
if (OnInputAsync != null)
241244
{
242-
_lastValue = value;
243-
CurrentValue = value;
244245
await OnInputAsync(value);
245246
}
246247
}

0 commit comments

Comments
 (0)