IgniteUI / ignite-ui

Ignite UI for jQuery by Infragistics

Home Page:https://bit.ly/2kuu1fT

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

View modes not rendered on Scheduler when property set on model

paulmoore1 opened this issue · comments

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