Git Product home page Git Product logo

meteor-autoform-nouislider's People

Contributors

aldeed avatar jimmiebtlr avatar patte avatar shkomg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

meteor-autoform-nouislider's Issues

slider not reactive?

I have a schema with one select and one slider and autosave=true. When I move the slider, the value is updated, but only once. After that,nothing happens when I move the slider until I change something else (the select in this case). After that the slider is active again.

At initial load (an update form), the slider sets itself at the correct value but if I change the value in the db (using Mongol) the slider does not react on it. If I on the other hand change the value for the select, in Mongol, it will immediately react on the new value. I do not see what I can have done wrong.

Slider widget not working - only one slider which does not move

Hi,

I have followed the guide from https://github.com/ElevateDev/meteor-autoform-nouislider
and set up the basic sliders, yet what I get on the AutoForm is only this.
sliders

I cannot move both sliders. There is no range either.

My setup is the following:

singleSlider: {

type: Number,

max: 150,

min: 30,

autoform: {

  type: "noUiSlider",

  noUiSliderOptions: {

    step: 10

  },

  noUiSlider_pipsOptions: {

    mode: 'steps',

    density: 5

  }

}

},

slider: {

type: RangeSchema,

max: 200,

min: 10,

autoform: {

  type: "noUiSlider",

  noUiSliderOptions: {

    step: 10

  },

  noUiSlider_pipsOptions: {

    mode: 'steps',

    density: 5

  }

}

}

Settings.insert({

 pushNotifications: true,

 singleSlider: 30,

 slider: {"lower": 10,"upper":200}

});

    {{#if Template.subscriptionsReady}}

    {{#autoForm collection="Settings" type=update doc=setting id="edit-form" autosave=true}}

        {{> afQuickField name='slider' start="[50,60]"}}

        {{> afQuickField name='singleSlider' range='{"min": 30,"max":50}'}}

    {{/autoForm}}

{{/if}}

Thank you for any clue or link to a working sample.

Cheers
java99

Is there a way to use events on this slider ?

I am not sure if its possible yet to use events for this slider ? noUiSlider seems not to be available global in meteor App and so I am not able to use events (like on update) for the slider.

Is there any way to do this with your package ?

Bug: This package disableds ``autoform.optional=false`` standard behaviour

Hi guys,

first of all: thanks a lot for this package!

BUT for me it is unusable as it disables autoform.optional=false standard behavior.

A configuration like below won't work as excpected,
because noUiSlider will ALWAYS set a value, even if the user has NOT touched the slider.

A possible solution might be to registered a ReactiveVar that knows if the user has clicked/touched the slider and it returns "value not set" if the compoment has NOT been clicked.

Example:
optional: false does NOT work as expected and will ALWAYS set a value, even if the user has NOT touched the element:

Schema = new SimpleSchema({
  scale: {
    type: Number,
    optional: false,  // BUG: even if the user DOES NOT touch this slider,
                      // a value of 1 will be set!
    min: 1,
    max: 10,
    autoform: {
      type: 'noUiSlider',
    }
  },
});  

Value gets reset when form redrawn

Hi there,

I'm having a minor issue when using the slider component with a single value. It seems if I change the slider, submit the form, leave the page and come back, the slider will always render using the initial value and not the new one the user submitted.

The problem lies in the storage of the template.data.atts.noUiSliderOptions, which stores the initial value as "start", after which all next renders will actually use that initial value instead of the defined template.data.value from the template data. I believe that template.data.value should always be leading when initializing options on re-renders of the component.

A simple refresh of the page fixes everything, but that's not the best solution :)

AutoForm.getFieldValue fired only first time

Hi, i want show the current Value after the Slider. But the value changed only after first mouseUp.
But i want always show the current value (onMouseDown). Is it possible with this slider?

new SimpleSchema({
width: {
        type: Number,
        label: "Width",
        min: 50,
        max: 3000,
        autoform: {
            type: "noUiSlider",
            noUiSliderOptions: {
                step: 10
            }
        }
    }
});
{{> afQuickField name="width"}}
    <span>{{currentFieldValue "width"}}</span>
Template.MyTemplate.helpers({
    currentFieldValue: function(fieldName) {
        var value = AutoForm.getFieldValue(fieldName);
        console.log(value);
        return value;
    }
});

Potentially incompatible change required to top-level dependency: aldeed:template-extension 3.4.3, was 4.0.0.

Hi, It would be very nice to have this nice package updated, I work with aldeed:template-extension
and is a bit of a trouble downgrade to 3.4.3.
Thanks in advance
meteor add elevatedevdesign:autoform-nouislider
=> Errors while adding packages:

While selecting package versions:
error: Potentially incompatible change required to top-level dependency: aldeed:template-extension 3.4.3, was 4.0.0.
Constraints on package "aldeed:template-extension":

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.