Fix TabView args.object for selectedIndexChangedEvent (#3800)

Add assert in existing test
Code formatting
This commit is contained in:
Hristo Hristov
2017-03-15 17:25:02 +02:00
committed by GitHub
parent 7b5ef052fd
commit e151c4dc4e
3 changed files with 5 additions and 5 deletions

View File

@@ -171,7 +171,7 @@ export class TabViewBase extends View implements TabViewDefinition, AddChildFrom
export const selectedIndexProperty = new CoercibleProperty<TabViewBase, number>({
name: "selectedIndex", defaultValue: -1, affectsLayout: isIOS,
valueChanged: (target, oldValue, newValue) => {
target.notify(<SelectedIndexChangedEventData>{ eventName: TabViewBase.selectedIndexChangedEvent, object: this, oldIndex: oldValue, newIndex: newValue });
target.notify(<SelectedIndexChangedEventData>{ eventName: TabViewBase.selectedIndexChangedEvent, object: target, oldIndex: oldValue, newIndex: newValue });
},
coerceValue: (target, value) => {
let items = target.items;

View File

@@ -106,8 +106,7 @@ export var hourProperty = new Property<TimePickerBase, number>({
// picker._setNativeTime();
if (picker.time) {
picker.time.setHours(picker.hour);
}
else {
} else {
picker.time = new Date(0, 0, 0, picker.hour, picker.minute);
}
} else {
@@ -136,6 +135,7 @@ export var maxHourProperty = new Property<TimePickerBase, number>({
if (!isHourValid(newValue)) {
throw new Error(getErrorMessage(picker, "maxHour", newValue));
}
if (isValidTime(picker)) {
// picker._setNativeMaxTime();
} else {
@@ -155,8 +155,7 @@ export var minuteProperty = new Property<TimePickerBase, number>({
// picker._setNativeTime();
if (picker.time) {
picker.time.setMinutes(picker.minute);
}
else {
} else {
picker.time = new Date(0, 0, 0, picker.hour, picker.minute);
}
} else {