We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I am using typescript template and "checkedChange" event is not working on my xml page.
main-page.xml-->
<Page loaded="pageLoaded" class="page" xmlns="http://schemas.nativescript.org/tns.xsd" xmlns:CheckBox="nativescript-checkbox"> <Page.actionBar> <ActionBar title="My App" icon="" class="action-bar"> </ActionBar> </Page.actionBar> <CheckBox:CheckBox checkedChange="{{ onCheckedChange }}" text="checkedChange event is not working" checked="false"/> </Page>
main-view-model.ts-->
import { Observable } from 'data/observable'; import { ObservableProperty } from "../../common/observable-property-decorator"; import { Page } from 'ui/frame'; export class HelloWorldModel extends Observable { @ObservableProperty() textFieldValue: string = ""; private _page:Page; constructor(page) { super(); this._page=page; } onCheckedChange(){ console.log("checked change"); } }
main-page.ts -->
import { EventData } from 'data/observable'; import { Page } from 'ui/page'; import { HelloWorldModel } from './main-view-model'; export function pageLoaded(args: EventData) { let page = args.object; page.bindingContext = new HelloWorldModel(page); }
The text was updated successfully, but these errors were encountered:
Got the same problem on Android (haven't tested on iOS yet). checkedChange does not fire while tap fires just fine.
XML:
<Page class="page" loaded="onPageLoaded" xmlns="http://schemas.nativescript.org/tns.xsd" xmlns:cb="nativescript-checkbox" > ... <cb:CheckBox id="testbox" checked="false" text="Test checkbox" color="#777777" fillColor="#0e79b2" fontSize="30" boxType="circle" loaded="onCheckboxLoaded" checkedChange="onCheckboxChanged"></cb:CheckBox>
NS v 4.2 tns-core-modules v 4.2.1 typescript v 3.1.3
Sorry, something went wrong.
Event should be in brackets
<CheckBox (checkedChange)="onChange($event)" checked="false">
checkedChange not firing in Javascript, but tap does. Have tried brackets around the event, but this causes a syntax error.
(checkedChange)="checkTap"
No branches or pull requests
I am using typescript template and "checkedChange" event is not working on my xml page.
main-page.xml-->
main-view-model.ts-->
main-page.ts -->
The text was updated successfully, but these errors were encountered: