Item is null in ClickEventArgs
Here is the code :
[...]
@inherits LayoutComponentBase
@inject IJSRuntime JSRuntime
<style>
.e-indent-icon:before {
content: "\e70b"
}
</style>
<EjsSidebar ID="sidebar" ref="sidebar" Type="SidebarType.Over" CloseOnDocumentClick="true">
<ChildContent>
<div class="title"> Sidebar content</div>
</ChildContent>
</EjsSidebar>
<EjsToolbar id="toolbar" Clicked="@OnToolbarClicked">
<ToolbarItems>
<ToolbarItem Id="itemSidebar" Type="ItemType.Button" TooltipText="SideBar" Click="OnSidebarClicked" PrefixIcon="e-indent-icon tb-icons" />
<ToolbarItem Id="itemDummy" Type="ItemType.Button" TooltipText="Dummy" PrefixIcon="e-indent-icon tb-icons" />
</ToolbarItems>
</EjsToolbar>
@functions
{
// References
EjsSidebar sidebar;
public void OnToolbarClicked(ClickEventArgs args)
{
var toto = JsonConvert.SerializeObject(args);
sidebar.Show();
}
}
[...]
@inject IJSRuntime JSRuntime
<style>
.e-indent-icon:before {
content: "\e70b"
}
</style>
<EjsSidebar ID="sidebar" ref="sidebar" Type="SidebarType.Over" CloseOnDocumentClick="true">
<ChildContent>
<div class="title"> Sidebar content</div>
</ChildContent>
</EjsSidebar>
<EjsToolbar id="toolbar" Clicked="@OnToolbarClicked">
<ToolbarItems>
<ToolbarItem Id="itemSidebar" Type="ItemType.Button" TooltipText="SideBar" Click="OnSidebarClicked" PrefixIcon="e-indent-icon tb-icons" />
<ToolbarItem Id="itemDummy" Type="ItemType.Button" TooltipText="Dummy" PrefixIcon="e-indent-icon tb-icons" />
</ToolbarItems>
</EjsToolbar>
@functions
{
// References
EjsSidebar sidebar;
public void OnToolbarClicked(ClickEventArgs args)
{
var toto = JsonConvert.SerializeObject(args);
sidebar.Show();
}
}
[...]
the value of toto is : "{"cancel":false,"item":null,"name":"clicked","originalEvent":{"cancel":false,"element":null,"event":null,"isInteracted":false,"model":null}}". How do I know from which Item the event com from ?
Thx.
SIGN IN To post a reply.
3 Replies
VS
Vijayanand S
Syncfusion Team
May 31, 2019 11:49 AM UTC
Hi Brice,
Sorry for the inconvenience caused.
We can reproduce the problem you reported and consider it as a defect. We created the defect report and provided the link below to track its status for further updates. The fix for this issue will be included in any of our weekly patch releases on or before June 20, 2019.
Please let me know if you have any questions.
Regards,
Vijay
Vijay
BF
Brice FROMENTIN
June 8, 2019 06:28 AM UTC
Thx the *.50beta fixed the issued :
toto = {"cancel":false,"item":{"id":"itemSidebar","prefixIcon":"e-indent-icon tb-icons","tooltipText":"SideBar","htmlAttributes":null,"cssClass":"","template":"","type":"Button","text":"","suffixIcon":"","width":"auto","showTextOn":"Both","overflow":"None","showAlwaysInPopup":false,"align":"Left"},"name":"clicked","originalEvent":{"cancel":false,"element":null,"event":null,"isInteracted":false,"model":null}}
KK
Karthigeyan Krishnamurthi
Syncfusion Team
June 10, 2019 09:18 AM UTC
Hi Brica,
We are happy that the reported issue has been resolved in *.50beta version.
Regards,
Karthi
SIGN IN To post a reply.
- 3 Replies
- 3 Participants
-
BF Brice FROMENTIN
- May 29, 2019 08:53 AM UTC
- Jun 10, 2019 09:18 AM UTC