You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In this demo, it can be seen that, although the custom summary template is rendered correctly, the summary result (Result) is null, so it is not displayed.
The template is defined in razor like:
public RenderFragment<IgbSummaryTemplateContext> WebGridOrderDateSummaryTemplate = (ctx) => {
var summaryResults = ctx.Implicit;
return @<div class="summary-temp">
<span><strong>@(summaryResults[0].Label)</strong><span>@(summaryResults[0].Result)</span></span>
<span><strong>@(summaryResults[1].Label)</strong><span>@(summaryResults[1].Result)</span></span>
</div>;
};
If the sample is changed to define the custom template in JS, as by the way the topic text describes, the summary result is rendered correctly:
igRegisterScript("OrderDateSummaryTemplate", (ctx) => {
var html = window.igTemplating.html;
var summaryResults = ctx.implicit;
return html`<div class="summary-temp">
<span><strong>${summaryResults[0].label}</strong><span>${summaryResults[0].summaryResult}</span></span>
<span><strong>${summaryResults[1].label}</strong><span>${summaryResults[1].summaryResult }</span></span>
</div>`
}, false);
My question is, is the current approach in the sample expected to work? If so, then an issue for the template context and the Result property being null should be logged in the https://github.com/IgniteUI/igniteui-blazor repo.
If this is not expected to work, it can then be fixed for the samples by defining the template in JS.
For the other grids, the corresponding demo also has issue with the custom summary template: Hierarchical grid, Tree grid, where they do not match their Angular equivalent (HGrid and TreeGrid).
P.S. this custom summary template sample also has an issue with the UnitsInStock custom summary - it is defined in Razor, however, this does not seem to work (check the code). On the other hand, the demo for custom summaries above it, defines it in JS and it is working as expected.
This is valid for the other grid summaries samples as well, one sample uses the razor approach and is not working correctly, and other is using JS and is okay.
In conclusion, the correct approach should be clarified, so that we can eventually fix the samples to use an unified and working one (in that case you can assign me), or log an issue for the library. @dkamburov@HUSSAR-mtrela
The text was updated successfully, but these errors were encountered:
@ddaribo This is a product issue, but we have similar cases elsewhere, particularly with templates, and resolving them may take some time.
In the meantime, we need to address this in the sample. For these scenarios, it's recommended to use the Script equivalent of properties/events, as it offers better performance.
In this demo, it can be seen that, although the custom summary template is rendered correctly, the summary result (Result) is null, so it is not displayed.
The template is defined in razor like:
If the sample is changed to define the custom template in JS, as by the way the topic text describes, the summary result is rendered correctly:
<IgbColumn Field="OrderDate" SummaryTemplateScript="OrderDateSummaryTemplate" ...></IgbColumn>
Reference to the same demo in WC, Angular and React.
My question is, is the current approach in the sample expected to work? If so, then an issue for the template context and the
Result
property beingnull
should be logged in the https://github.com/IgniteUI/igniteui-blazor repo.If this is not expected to work, it can then be fixed for the samples by defining the template in JS.
For the other grids, the corresponding demo also has issue with the custom summary template: Hierarchical grid, Tree grid, where they do not match their Angular equivalent (HGrid and TreeGrid).
P.S. this custom summary template sample also has an issue with the
UnitsInStock
custom summary - it is defined in Razor, however, this does not seem to work (check the code). On the other hand, the demo for custom summaries above it, defines it in JS and it is working as expected.This is valid for the other grid summaries samples as well, one sample uses the razor approach and is not working correctly, and other is using JS and is okay.
In conclusion, the correct approach should be clarified, so that we can eventually fix the samples to use an unified and working one (in that case you can assign me), or log an issue for the library. @dkamburov @HUSSAR-mtrela
The text was updated successfully, but these errors were encountered: