Skip to content

Commit 3b2b55b

Browse files
authored
doc(EditorForm): add IsDisplay parameter documentation (#6679)
1 parent 7082fa7 commit 3b2b55b

File tree

4 files changed

+16
-2
lines changed

4 files changed

+16
-2
lines changed

src/BootstrapBlazor.Server/Components/Samples/EditorForms.razor

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,14 @@
130130
</ValidateForm>
131131
</DemoBlock>
132132

133+
<DemoBlock Title="@Localizer["IsDisplayTitle"]" Introduction="@Localizer["IsDisplayIntro"]" Name="IsDisplay">
134+
<EditorForm Model="@Model" ItemsPerRow="3" IsDisplay="true">
135+
<FieldItems>
136+
<EditorItem @bind-Field="@Model.Hobby" Items="@Hobbies" />
137+
</FieldItems>
138+
</EditorForm>
139+
</DemoBlock>
140+
133141
<AttributeTable Items="@GetAttributes()" />
134142

135143
<AttributeTable Title="@Localizer["EditorFormAttributeTitle"]" Items="@GetEditorItemAttributes()"></AttributeTable>

src/BootstrapBlazor.Server/Components/Samples/EditorForms.razor.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ protected override void OnInitialized()
4949
DateTime = new DateTime(1997, 12, 05),
5050
Education = EnumEducation.Middle
5151
};
52+
Model.Hobby = Foo.GenerateHobbies(FooLocalizer).Take(3).Select(i => i.Text);
5253
}
5354

5455
[NotNull]

src/BootstrapBlazor.Server/Locales/en-US.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2639,7 +2639,9 @@
26392639
"TestName": "Tom",
26402640
"TestAddress": "The test address",
26412641
"AutoGenerateDescription": "In this example, by setting <code>the autoGenerate AllItem</code> value to <code>false</code>, turning off auto-generation, and rendering the form editing by manually adding two <code>EditoItem</code> edits",
2642-
"SkipValidateDescription": "In some cases, the value of some columns in the form may be a secondary classification, etc., and you need to know the information for a level 1 classification, at which point the first-level classification requires additional components to render if <code>Select</code>, which is independent of the current context binding model <code>Model</code>, which requires that you set the <code>SkipValidate</code> value to <code>true</code>, turn off model validation for this component"
2642+
"SkipValidateDescription": "In some cases, the value of some columns in the form may be a secondary classification, etc., and you need to know the information for a level 1 classification, at which point the first-level classification requires additional components to render if <code>Select</code>, which is independent of the current context binding model <code>Model</code>, which requires that you set the <code>SkipValidate</code> value to <code>true</code>, turn off model validation for this component",
2643+
"IsDisplayTitle": "Readonly Form",
2644+
"IsDisplayIntro": "Make the entire form non-editable by setting <code>IsDisplay=\"true\"</code>"
26432645
},
26442646
"BootstrapBlazor.Server.Components.Samples.FloatingLabels": {
26452647
"FloatingLabelsTitle": "FloatingLabel",

src/BootstrapBlazor.Server/Locales/zh-CN.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2640,7 +2640,10 @@
26402640
"TestName": "张三",
26412641
"TestAddress": "测试地址",
26422642
"AutoGenerateDescription": "本例中通过设置 <code>AutoGenerateAllItem</code> 值为 <code>false</code>,关闭自动生成功能,通过手动增加两个 <code>EditorItem</code> 编辑项来呈现表单编辑",
2643-
"SkipValidateDescription": "在某些情况下表单中有些列的值可能是二级分类等等,需要知道一级分类的信息,这个时候一级分类需要额外的组件来呈现,如果 <code>Select</code>,而这个组件是与当前上下文绑定模型 <code>Model</code> 无关的,这种需求中通过设置 <code>SkipValidate</code> 值为 <code>true</code>,关闭此组件的模型验证功能即可"
2643+
"SkipValidateDescription": "在某些情况下表单中有些列的值可能是二级分类等等,需要知道一级分类的信息,这个时候一级分类需要额外的组件来呈现,如果 <code>Select</code>,而这个组件是与当前上下文绑定模型 <code>Model</code> 无关的,这种需求中通过设置 <code>SkipValidate</code> 值为 <code>true</code>,关闭此组件的模型验证功能即可",
2644+
"IsDisplayTitle": "只读表单",
2645+
"IsDisplayIntro": "通过设置 <code>IsDisplay=\"true\"</code> 使整个表单不可编辑"
2646+
26442647
},
26452648
"BootstrapBlazor.Server.Components.Samples.FloatingLabels": {
26462649
"FloatingLabelsTitle": "FloatingLabel 输入框",

0 commit comments

Comments
 (0)