question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

asObject: true is not binding

See original GitHub issue

When I update data in database my dropdown list doesn’t get updated (downloads only once): image

What I try to achieve is .on('value', function(){...}) thing.

I found that in VueFire source: image and that: image

So it should behave like I thought it would, but even when I delete readCallback data still behave as once.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
posvacommented, Oct 29, 2017

Well, once you got your data bound, it’s just Vue 🙂 The only difference is that the data may change because of another client changing it but you don’t even have to worry about it because vuefire handles the update for you

0reactions
janswistcommented, Oct 28, 2017

Here is the updated fork: https://jsfiddle.net/xgtrjsz9/1/

Now it’s working, but don’t know how to implement it to my dropdown function:

firebase.database().ref('places/' + placeId + "/schedules").on('value', function(snapshot2) {				

		var holder = document.getElementById('dropdownOptionList');
		$('#dropdownOptionList').empty();
		//show list of available schedules for specified place
		snapshot2.forEach(function(childSnapshot) {					
			
			scheduleId = childSnapshot.key;																
			
			var li = document.createElement('li');
			var a = document.createElement('a');
			a.setAttribute('href', '#');
			a.setAttribute('data-src', 'https://terminarz-28eeb.firebaseio.com/reservations.json?orderBy=\"scheduleId\"&equalTo=\"' + childSnapshot.key + '\"');
			a.setAttribute('data-id', childSnapshot.key);
			a.appendChild(document.createTextNode(childSnapshot.val()));
			
			li.appendChild(a);
			holder.appendChild(li);					
			
		});					
		
		activateDropdown();				
	});		

Maybe should I just go with Vue.component() and put relevant mustaches in place?

Read more comments on GitHub >

github_iconTop Results From Across the Web

AsObject not binding as actual object · Issue #11 · vuejs/vuefire ...
When I bind as an object, I will still have to iterate through the object to access my values.
Read more >
Einstein Analytics: Binding serialization functions asString() or ...
asObject () Function Passes data through with no serialization. ... use asObject() when you bind not a string value, such as true /...
Read more >
Issue serializing checkbox as boolean property and MVC ...
and upon AJAX POST, MVC's databinding correctly sets the model property value to true as expected. However, in certain cases, i need to ......
Read more >
Bind Parts of a Query | Analytics Bindings Developer Guide
This example illustrates what the interactions look like for different parts of a query. The chart is bound based on selections for grouping,...
Read more >
BooleanExpression (Java SE 9 & JDK 9 ) - Oracle Help Center
Creates a new BooleanExpression that holds true if this and another ObservableBooleanValue are equal. BooleanBinding · not​(). Creates a ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found