Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

View modes not rendered on Scheduler when property set on model #2256

Open
paulmoore1 opened this issue Mar 21, 2024 · 0 comments
Open

View modes not rendered on Scheduler when property set on model #2256

paulmoore1 opened this issue Mar 21, 2024 · 0 comments
Labels

Comments

@paulmoore1
Copy link

Description

When the view mode for a Scheduler is set on the model in ASP.NET Core, it fails to render correctly.
From inspecting the behaviour in the console, this appears to be because the viewMode variable in the JavaScript is all lowercase e.g. "monthview" instead of "monthView". This means that it fails to be matched correctly (see attached screenshot).

  • ignite-ui version: Ignite UI for ASP.NET Core
  • browser: any

Steps to reproduce

(code sample attached)

  1. Make a model that extends the Infragistics SchedulerModel
public class UISchedulerModel : SchedulerModel
{
  public UISchedulerModel(IEnumerable<UISchedulerAppointmentModel> appointments, IEnumerable<SchedulerViewMode> views = null)
  {
    DataSource = appointments.AsQueryable();
    Views = views?.ToList() ?? new List<SchedulerViewMode>();
  }
}
  1. Render the model in a view using the SchedulerWrapper
@using Infragistics.Web.Mvc
@model Program.Namespace.UISchedulerModel
@{
  SchedulerWrapper myScheduleWrapper = new SchedulerWrapper(Html)
  {
    Model = Model
  };
}

@(myScheduleWrapper.Render())
  1. ...

Result

If the views parameter passed in to the model is null, then the scheduler renders correctly.
If a value is set for the views e.g.
IEnumerable<SchedulerViewMode> viewModes = new List<SchedulerViewMode>() { SchedulerViewMode.MonthView, SchedulerViewMode.AgendaView }; then the scheduler fails to render

Expected result

The scheduler is rendered correctly whatever view modes are set.

Attachments

igScheduler.zip

Target result:
Target rendering

Actual result (failed rendering):
Failed rendering

Console error:
Error in console

@paulmoore1 paulmoore1 added the bug label Mar 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant