question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Any way to check if from/to values where changes by user?

See original GitHub issue

Hello! Is there any way I could check if user was changed the options.from or options.to options? I know, I could create an event onChange and if some value was changed then set the flag, for example, isFromOptChanged = 1 and then track it, but asking just to be sure if there any native functionality to not reinvent bicycle.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
abriginetscommented, May 18, 2018

Well, I can see that this issue is some kind of interesting to resolve for some people. Here’s how I resolved it.

Let’s imagine that we have an array with different numerical values that I’m using as values in my instance of ionRangeSlider. I can find it’s minimum and maximum values by very well known JavaScript function. Since I have those numbers I could check if current from option is different from my local minimum value and option to is different from my local maximum value. At any time. And if they’re not similar, I can make a conclusion that my slider was changed somehow(by user or programatically).

I guess that this issue should be closed 'cause, as it was said earlier, this question is out of scope. I’ll close the issue now, but feel free to ask any question you what.

0reactions
mejiafabiandjcommented, May 4, 2018

maybe you can check which slider contains the “type_last” class

onFinish: function (data) { if ( $(data.slider).find(‘.irs-slider.from’).hasClass(‘type_last’) ) {` console.log(‘From slider changed’) } else { console.log(‘To slider changed’) } }

Read more comments on GitHub >

github_iconTop Results From Across the Web

Need a macro to detect if cell value changes from current value
Here is my favorite way to detect changes in an Excel VBA app: Create an exact copy of the range you're watching in...
Read more >
How to find if variable value changed and its type of change
and output for this data step would be like below. Basically i want to check if product was change temporary or permanent.
Read more >
Detect change in data to specified value - MATLAB - MathWorks
tf = hasChangedTo(data,value) returns 1 (true) if the value of data is not equal to value at the beginning of the previous time...
Read more >
Docs | GSAP | gsap.fromTo() - GreenSock
A gsap.fromTo() tween lets you define BOTH the starting and ending values for an animation (as opposed to from() and to() tweens which...
Read more >
MIT App Inventor Control Blocks
The animation below shows how to use the if else mutator block. for each number from to. Runs the blocks in the do...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found