Giter Club home page Giter Club logo

Comments (7)

brandonpayton avatar brandonpayton commented on July 29, 2024

@cjolif, the intent is that it should only give you indices for items in the range. This sounds like a bug.

from dstore.

brandonpayton avatar brandonpayton commented on July 29, 2024

@cjolif, this is on my radar, but I haven't yet had time to resolve it.

from dstore.

cjolif avatar cjolif commented on July 29, 2024

@brandonpayton any progress on that one?

from dstore.

brandonpayton avatar brandonpayton commented on July 29, 2024

Hi @cjolif,

I had a chance to sit down with this tonight, and this turned out to be expected behavior. The crux of the issue is that dstore/Observable is not designed to enforce ranges. If an item is inserted in the middle of a tracked range, Observable will not notice that the insertion should cause the last item in the range to be removed because it no longer falls in the range, and if an item in a tracked range is removed from the store, Observable will not attempt to fetch the next item that would now fall in the range.

The expected use case is that range will be called after track to allow you to have a single change listener over a collection you are paging. You may call track on a ranged collection, but Observable will not enforce the range, only the filter and sort queries. This is somewhat confusing, and we are discussing changes that would make this clearer such as removing the range method and adding a fetchRange method that returns an array rather than a collection.

Thanks for your patience. I apologize for the confusion and the long response response time.

from dstore.

cjolif avatar cjolif commented on July 29, 2024

thanks a lot @brandonpayton. I guess this means I will have to ignore myself the notification coming outside of my range.

from dstore.

brandonpayton avatar brandonpayton commented on July 29, 2024

@cjolif, what is your use case for tracking a single range collection? It would be good for us to be familiar with in case we can help.

from dstore.

cjolif avatar cjolif commented on July 29, 2024

@brandonpayton maybe I myself wrongly assumed this use-case would make sense. Let me think more about this and come back to you.

from dstore.

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.