Comments (9)
Here is the HTML it renders from chrome devtools:
<div class="row">
<div class="input-field col s12">
<select multiple="" name="categories" id="9vT38QXCTtCirrLGr" data-schema-key="categories" class="browser-default">
<option value="Birds">Birds</option>
<option value="Mammals">Mammals</option>
</select>
<label for="9vT38QXCTtCirrLGr" class="active">Tags</label>
</div>
</div>
from meteor-autoform-materialize.
I figured it out.
Why does this file: meteor-autoform-materialize/inputTypes/select-multiple/select-multiple.js basically make the select-multiple not work with materialize?
from meteor-autoform-materialize.
so what did you do my friend ??? :(
from meteor-autoform-materialize.
Ah sorry, I'll just go back over the code and update here
from meteor-autoform-materialize.
I'll get back with an answer for you tomorrow, don't have access to a working copy ATM. Sorry!
from meteor-autoform-materialize.
take all your time my friend :) thank you in advance
from meteor-autoform-materialize.
In my subscriptions for the category object, I added in some jquery bits to sort the rendering out.
self.subscribe('categories', function() {
setTimeout(function()` {
$("select.browser-default").removeClass('browser-default');
$("select").material_select();
}, 100);
});
I also took the multiple-select out of the schema, but i don't think it made a lot of difference.
categories: {
type: [String],
label: "Tags",
autoform: {
options: function() {
return Categories.find().map(function(a) {
return {label: a.title, value: a.title}
})
}
},
from meteor-autoform-materialize.
thank you for your answer it does work fine, but i kinda found a better solution if it would interest anyone :
categories: {
type: [String],
optional: false,
label: "Categories",
autoform: {
type: "select",
afFieldInput: {
multiple: true
}
}
},
from meteor-autoform-materialize.
Just tried your solution, unfortunately, it did nothing except give me a multiple select in the traditional sense, not a dropdown with multiple selector
from meteor-autoform-materialize.
Related Issues (20)
- Still alive? HOT 2
- materialize icons don't work HOT 1
- pickadate is not persisting the date object in the desired timezone? HOT 11
- add data-required on afFormGroup div HOT 1
- Multiple date picking ? HOT 1
- pickadate is not a function Error HOT 5
- Could upgrade to last of AutoForm? HOT 8
- Prefilled form with number 0, breaks the CSS
- Placeholders overlapping input fields HOT 3
- input-col-class not supported HOT 1
- Reactively switch between select and free-text HOT 1
- select-checkbox-inline is not inline HOT 1
- select-radio-inline not showing HOT 4
- pickadate fields with type: Number are not formatting MM/YYYY in autoform 'Update' forms HOT 17
- pickadate within an array type, opens a modal within the array div. See image HOT 2
- How to make Array type horizontal or inline? HOT 1
- layout problem when displaying group of checkboxes HOT 1
- misaligned text on [ ADD + ] button for adding array elements HOT 1
- Internationalize ADD and REMOVE buttons HOT 1
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 meteor-autoform-materialize.