switch
switch copied to clipboard
Fix for Array type model
An update that ensures the Switch value is added to and removed from the model when the model is of Array type. Also renamed method getDateType() to getDataType() to reflect what it actually does.
Before this change, if the model was of Array type, and the Switch value was meant to represent an item in the model's array, then the value was not removed from the model's array when the Switch checked state changed from true to false. Also the Switch value would be added again to the model's array when the Switch checked state changed from false to true.