Skip to content

Combine fetching Remote Data with creating new items #141

Answered by oyejorge
mrwunderbar666 asked this question in Q&A
Discussion options

You must be logged in to vote

The problem is the returnData in your create method. The object you're trying to create doesn't have a parameter matching your valueField which is url. This create method will work

create: function(input, callback) {
	var returnData = {
		value:input,
		text:input,
		name:input,
		description:'none',
		owner: {
			login:'none',
			avatar_url: 'none' 
		},
		url: 'a-url',
	};
	callback(returnData);
},

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@mrwunderbar666
Comment options

Answer selected by mrwunderbar666
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants