Coder Social home page Coder Social logo

Comments (12)

triniwiz avatar triniwiz commented on May 18, 2024 3

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.

GoodLadCarlos avatar GoodLadCarlos commented on May 18, 2024 1

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.

bradmartin avatar bradmartin commented on May 18, 2024

from nativescript-checkbox.

oncul avatar oncul commented on May 18, 2024

<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.

bradmartin avatar bradmartin commented on May 18, 2024

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.

oncul avatar oncul commented on May 18, 2024

@triniwiz thank you. İ didnt see that property :)

from nativescript-checkbox.

oncul avatar oncul commented on May 18, 2024

@triniwiz its not worked.

from nativescript-checkbox.

oncul avatar oncul commented on May 18, 2024

#27

i added a pull request for this event handler

from nativescript-checkbox.

triniwiz avatar triniwiz commented on May 18, 2024

@cagatayoncul works fine for me in Angular

from nativescript-checkbox.

himanshu331 avatar himanshu331 commented on May 18, 2024

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.

triniwiz avatar triniwiz commented on May 18, 2024

@himanshu331 android or iOS

from nativescript-checkbox.

himanshu331 avatar himanshu331 commented on May 18, 2024

In nativescript ..

from nativescript-checkbox.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.