Comments (12)
If you want the change event use the following
<CheckBox:CheckBox row="1" col="2" checkedChange="checkTap" colspan="2" text="Show" checked="{{ filter.show }}" />
exports.checkTap = function(args){
console.log(args.value); // returns first state of checkbox
}
from nativescript-checkbox.
Try to put the code inside the setTimeout function:
//xml
<CheckBox:CheckBox id="item1" text="testName" tap="_checkTapped"/>
//script
function _checkTapped() {
console.log("tapped");
setTimeout(() => {
let checkBox = topmost().getViewById('item1');
console.log('checked prop value = ' + checkBox.checked);
}, 100);
}
from nativescript-checkbox.
from nativescript-checkbox.
<CheckBox:CheckBox row="1" col="2" tap="checkTap" colspan="2" text="Show" checked="{{ filter.show }}" />
exports.checkTap = function(args){
console.log(args.object.checked); // returns first state of checkbox
}
I am trying on Android. I need to get event check state changed.
from nativescript-checkbox.
I've not tested anything but try calling the toggle
method on the check box to switch its value. Then get the value.
from nativescript-checkbox.
@triniwiz thank you. İ didnt see that property :)
from nativescript-checkbox.
@triniwiz its not worked.
from nativescript-checkbox.
i added a pull request for this event handler
from nativescript-checkbox.
@cagatayoncul works fine for me in Angular
from nativescript-checkbox.
hi triniwiz ,
is it possible to change the color property of checkbox . like:
our checkbox border color is grey when i click on it then checkbox color will be fill with different color.
plz reply .
from nativescript-checkbox.
@himanshu331 android or iOS
from nativescript-checkbox.
In nativescript ..
from nativescript-checkbox.
Related Issues (20)
- Checkbox after navigate back HOT 1
- Checkbox alignment problem on IOS HOT 7
- Class color is not applied to label HOT 3
- Tap on checkbox text - IOS HOT 2
- Unstable behaviour when used in an iterator like v-for HOT 3
- Change delay animation
- Text wrap HOT 1
- could not be resolved to an NgModule class. - Error in compile with Ivy - Angular 9 HOT 9
- Is this plugin compatible with nativescript 7? HOT 6
- font size of others elements get overrided HOT 4
- Angular Demo HOT 6
- ngcc.config.js file still needed? HOT 7
- TypeError: Class constructor BaseValueAccessor cannot be invoked without 'new' HOT 1
- Changing the color of tick in ios HOT 1
- viewModel update doesn't toggle the checkbox
- Crash in Android device when adding nativescript-checkbox to a Nativescript 8.2.2 project HOT 2
- Adding background-color causes crash on Android with nativescript 8.2.2
- More examples for vue
- TintColor on native Image
- 'Nativescript' spelled 'Nativecript' in various places
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nativescript-checkbox.