elevatedev / meteor-autoform-nouislider Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
hi! would you mind releasing the newest version to atmosphere? thx!
Otherwise optional: false validation will fail.
Looks to be caused by: https://github.com/ElevateDev/meteor-autoform-nouislider/blob/master/autoform-nouislider.js#L7
Is there a reason for returning early here?
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.
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.
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
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 ?
Hi,
Is it possible to show the current value of the slider in the view as shown on the noUiSlider examples?
Thank you
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',
}
},
});
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 :)
I'm trying to implement your example on Meteorpad. The form renders fine when removing slider from the CollectionSchema, but adding it yields `'Unexpected object in htmljs in toText'`` in the console (opening the dynamic app URL in a new tab).
Would you mind taking a look and seeing if you can get it to work?
UPDATE: It works when changing to fuatsengul:autoform-nouislider.
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;
}
});
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":
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.