I have a TokenBox on my FormLayout:
C#@model SampleProj.ViewModels.MyClass
@Html.DevExpress().FormLayout(settings =>
{
settings.Name = "formLayout";
settings.Width = Unit.Percentage(100);
settings.Items.AddGroupItem(group =>
{
group.GroupBoxDecoration = GroupBoxDecoration.None;
group.Width = Unit.Percentage(100);
group.Items.Add(item =>
{
item.Name = "formLayoutGroupTokens";
item.NestedExtensionType = FormLayoutNestedExtensionItemType.TokenBox;
var tbSettings = (TokenBoxSettings)item.NestedExtensionSettings;
tbSettings.Properties.NullText = "Enter text";
tbSettings.Name = "Text";
tbSettings.Properties.ValidationSettings.Assign(SampleProj.ViewModels.ValidationHelper.CommonValidationSettingsRequired("Field required at least one token"));
tbSettings.Width = Unit.Percentage(100);
item.Caption = "Tokens";
});
});
}).GetHtml()
But when I copy some text with comma or semi-colon separators from clipboard, the output token box shows only first item from text.
When I continue press ctrl+V, token box add next item from text but only one:
Text:
111;222;333;444
Output:
- 111x
-> ctrl+V - 111x 222x
-> ctrl+V - 111x 222x 333x
-> ctrl+V - 111x 222x 333x 444x
Now I press again ctrl+V:
5)111x 222x 333x 444111x
Then after pressing ctrl+V token box will ignore anything from input text.
What I should do to correct such behavior?
Thanks a lot!
Hello Nikita,
I reproduced this behavior. We need additional time to research it. We will update this thread once we have results.
Hello Nikita,
While our developers are working on changing the described behavior, I suggest you don't use the TokenBoxProperties.Properties.NullText property as a temporary solution to overcome the problem.