Giter Site home page Giter Site logo

Comments (12)

EddyVerbruggen avatar EddyVerbruggen commented on May 23, 2024

Wait, are you saying you fixed #46 then?

from nativescript-plugin-firebase.

jlooper avatar jlooper commented on May 23, 2024

No, we turned out attention to making the app work great on iOS :) - let me comment the other issue

from nativescript-plugin-firebase.

EddyVerbruggen avatar EddyVerbruggen commented on May 23, 2024

Once I figure out #46 for your app I'll take a look at this one. But it's a toughie.

from nativescript-plugin-firebase.

jlooper avatar jlooper commented on May 23, 2024

Just to note, the ordering is super nutty atm
groceries

from nativescript-plugin-firebase.

EddyVerbruggen avatar EddyVerbruggen commented on May 23, 2024

If I add a console.log statement in the query function you linked to above then I won't see it in my log so I don't think the query is executed.

Instead, in the constructor of the same class there's a firebase.addValueEventListener which I think is the one actually retrieving the data here.

You could btw sort clientside to avoid using the query function at all.

from nativescript-plugin-firebase.

jlooper avatar jlooper commented on May 23, 2024

the query is hit by the event listener when the data changes. So if you add an item, you should see that query run. It's also hit when the page first loads to retrieve the list, or any time the database data is altered. I would think that it would be more efficient for the plugin to handle the sorting on the database side, right? If it is too hard, though, we can work on client side sorting. 👍 thanks!

from nativescript-plugin-firebase.

EddyVerbruggen avatar EddyVerbruggen commented on May 23, 2024

Hey Jen, did you try adding that log statement? Seriously, I don't think the query runs at all so sorting is never applied.

from nativescript-plugin-firebase.

jlooper avatar jlooper commented on May 23, 2024

ooh, I think you're right. We have changed the code to make the sync work. Debugging now. Thanks for the heads up!

from nativescript-plugin-firebase.

jlooper avatar jlooper commented on May 23, 2024

It has to be sorted using a pipe if you want to done client side

from nativescript-plugin-firebase.

codef0rmer avatar codef0rmer commented on May 23, 2024

@jlooper I've also faced the same problem. Sorting in firebase.query especially with firebase.QueryLimitType.LAST is a bit invalid. I'd to use a custom sort filter over the list again!

from nativescript-plugin-firebase.

prantikv avatar prantikv commented on May 23, 2024

I am unable to sort data using singleEvent: false is that it expected behavior? The sorting works when I use singleEvent: true

from nativescript-plugin-firebase.

JillevdW avatar JillevdW commented on May 23, 2024

Issue #405 seems to be relevant here. I feel piping on the client side is a hacky work-around seeing as it'll be a major hit to performance on bigger queries.

from nativescript-plugin-firebase.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.