Closed chneau closed 5 years ago
Thanks, I reverted last pull request. Please try with 0.1.18 version
Hello, thanks for the quick response !
It is now working well, the user can select an option, it still on the autoform selectize and it doesn't disappear anymore. Well done !
@CharlesNo , can you provide sample code affected by fix in version 0.1.17? I try to reproduce this bug but everything works as a charm for me. I tried autosave option on and of, multiple, optionsMethodParams as well, but still no effect. Any suggestions? Is there something specific about your project?
Hello @Nieziemski , I downgraded to 0.1.17 and it doesn't work, my package file includes this :
vazco:universe-selectize@=0.1.17
vazco:universe-autoform-select@=0.3.9
Then, I have an autoform generated from the schema :
'tasks.$.location':
type:String
optional:false
label:'Location'
autoform:
type:"universe-select"
optionsMethod:'getOptionsLocations'
This is just an exemple but it was actually not working anywhere else. I show my form with a quickform.
My server method is just like one of the example. What happens is the following : I input some letters to find a location, I click on it, the select is blank. I did check in the websocket inspector and it looks like the value is not saved. Downgrading to 0.1.16 (and universe-autoform-select to 0.3.8) or upgrading to 0.1.18 (and universe-autoform-select to 0.3.9) looks to work fine.
My meteor method looks like this:
getOptionsLocations:({searchText,values})->
if !@userId then throw new Meteor.Error('not-authorized')
@unblock()
if searchText?
return Locations.find({name:{$regex: searchText, $options: 'i'}}, {limit: 15}).map((d)->{label:d.name,value:d._id})
if values.length
return Locations.find({_id:{$in:values}}).map((d)->{label:d.name,value:d._id})
return Locations.find({}, {limit:15,sort:{name:1}}).map((d)->{label:d.name,value:d._id})
Meteor methods call doesn't work (the value is never assigned, UI we can't assign a value in a selectize + meteorMethod).
I found that downgrading like this was working:
vazco:universe-selectize@=0.1.16 vazco:universe-autoform-select
I will keep update this I'm trying to search precisely why it's not working.
Regards, Charles