fix(module: textarea): missing disabled style affix-wrapper-disabled doesn't append" (#3538)
* fix: when TextArea in disabled state the "affix-wrapper-disabled" didn't append to span Co-authored-by: Yuriy Zuev <yuriy.zuev@swtecnn.com>
This commit is contained in:
Родитель
316d0aacbf
Коммит
cb47c1a244
|
@ -156,7 +156,9 @@ namespace AntDesign
|
|||
.If($"{PrefixCls}-affix-wrapper-textarea-with-clear-btn", () => AllowClear)
|
||||
.If($"{PrefixCls}-affix-wrapper-has-feedback", () => FormItem?.HasFeedback == true)
|
||||
.GetIf(() => $"{PrefixCls}-affix-wrapper-status-{FormItem?.ValidateStatus.ToString().ToLowerInvariant()}", () => FormItem is { ValidateStatus: not FormValidateStatus.Default })
|
||||
.If($"{PrefixCls}-affix-wrapper-rtl", () => RTL);
|
||||
.If($"{PrefixCls}-affix-wrapper-rtl", () => RTL)
|
||||
.GetIf(() => $"{PrefixCls}-affix-wrapper-disabled", () => Disabled)
|
||||
;
|
||||
|
||||
ClassMapper
|
||||
.Add("ant-input-textarea ")
|
||||
|
|
|
@ -51,6 +51,22 @@
|
|||
attribute.Should().Be($"{value.Length}");
|
||||
}
|
||||
|
||||
//Check wrapper marks as disabled when TextArea disabled state
|
||||
[Fact]
|
||||
public void TextArea_Wrapper_Disabled()
|
||||
{
|
||||
//Arrange
|
||||
JSCommonMock();
|
||||
JSInterop.Setup<AntDesign.TextArea.TextAreaInfo>(JSInteropConstants.InputComponentHelper.GetTextAreaInfo, _ => true)
|
||||
.SetResult(_textAreaInfo);
|
||||
string value = "0123456789";
|
||||
var cut = Render(@<AntDesign.TextArea ShowCount Value=@value Disabled/>);
|
||||
//Act
|
||||
var span= cut.Find("span");
|
||||
//Assert
|
||||
span.ClassList.Should().Contain("ant-input-affix-wrapper-disabled");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void TextArea_ShowCount_increase()
|
||||
{
|
||||
|
|
Загрузка…
Ссылка в новой задаче