Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The Iterable filter is limited to one dimension #29

Open
kamarton opened this issue Oct 12, 2019 · 3 comments
Open

The Iterable filter is limited to one dimension #29

kamarton opened this issue Oct 12, 2019 · 3 comments
Labels
help wanted status:ready for adoption Feel free to implement this issue.

Comments

@kamarton
Copy link
Contributor

What steps will reproduce the problem?

Currently, the filtered value is treated as $item[$field]. I'm not really frontend developer, but I think yii2 knew it too:
https://github.com/yiisoft/yii2/blob/f8611d170d77f8b89f24bd80e7f3b6b2a8947380/framework/grid/DataColumn.php#L232

What is the expected result?

Yii3 also uses <field>.<subfield> with ArrayHelper::getValue()

What do you get instead?

Currently not supported.

Additional info

in #28 issue also affect the implementation.

Q A
Version 1.0.0-under development
PHP version -
Operating system -
@samdark
Copy link
Member

samdark commented Oct 13, 2019

I think there's no need to support that on data provider level. Having it at grid level should be enough.

@kamarton
Copy link
Contributor Author

An interesting question, because basically you can avoid (eg. flatten, filter in browser with javascript). But I can imagine its use:

$data = StoreAR::find()->with('location')->where(..public..)->asArray()->all();  // eg counts less than 100
$cache->set('stores', $data);
// ...
$data = $cache->get('stores');
$reader = (new IterableDataReader($data))
   ->withFilters(new Like('location.city', $cityFilter));
// ...

@samdark
Copy link
Member

samdark commented Oct 16, 2019

I'd postpone it till grids are implemented.

@samdark samdark added this to the 2.0.0 milestone Jan 9, 2023
@samdark samdark removed this from the 2.0 milestone Oct 18, 2024
@samdark samdark added status:ready for adoption Feel free to implement this issue. help wanted and removed status:under discussion labels Oct 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted status:ready for adoption Feel free to implement this issue.
Projects
None yet
Development

No branches or pull requests

2 participants