Coder Social home page Coder Social logo

Comments (7)

samdark avatar samdark commented on June 18, 2024

That is correct. I found no easy way to implement that because how filter is applied differs per data reader implementation. In array reader that's directly checking an item, in SQL reader that's forming a query.

If you have idea on how to implement it, I'd love to hear it.

from data.

kamarton avatar kamarton commented on June 18, 2024

In this form, it severely limits the opportunity. Simply put, I know I use ArrayDataProvder or ActiveDataProvider, so why can't I add my own custom filter.

At worst, the filter you create is limited to some DataProviders.

Suggest: different data providers need to define separate interfaces, and if you define it on a filter, you can use it.

In this case, e.g. the regexp filter:

  • define function for ArrayDataProvider: preg_match(...)
  • define function for ActiveDataProvider: new Expression('REGEXP ...')
  • not define function for XxxxxDataProvider: throw exception not supported filter.

from data.

samdark avatar samdark commented on June 18, 2024

I want to build GridView on top of this package and it should not be aware which data provider is used and rely on interface.

from data.

kamarton avatar kamarton commented on June 18, 2024

GridView also has to work with Filter classes, I see no reason to define a GridView custom ColumnFilter, which can also be defined by Custom Filter.

I will think about this problem, but I think there is something wrong between the layers if you don't allow it.

from data.

samdark avatar samdark commented on June 18, 2024

Yes, I'd like to allow it as well. Just had no immediate idea on how to do it best.

from data.

kamarton avatar kamarton commented on June 18, 2024

Although I was thinking of a similar solution, I feel a bit hurried about the topic. It is true that it is currently applicable on its own at this layer, but as the upper layers enter, it may not be the right solution at all. It seems to be a detour rather than a layered approach.

from data.

samdark avatar samdark commented on June 18, 2024

This one is solved now. PR is to be merged soon.

from data.

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.