Giter VIP home page Giter VIP logo

filament-advancedfilter's People

Contributors

36864 avatar atoff avatar devadattas avatar dmandrade avatar erenmustafaozdal avatar faizananwerali avatar howdu avatar kingmaker-agm avatar kitbs avatar marksalmon avatar mohammadhprp avatar prageeth-peiris avatar rlockett1121 avatar rubberneck avatar saulens22 avatar stephanus-tantiono avatar summonshr avatar zaak86 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

filament-advancedfilter's Issues

Json field filter

protected function applyClause(Builder $query, string $column, string $clause, array $data = []): Builder

need to change

fn (Builder $query) => $query->where($column, $operator, (int)$data['value'])

Getting `ErrorException: Undefined array key ""` when selecting blank option

Describe the bug
The error Undefined array key "" when we select the option "Select an option" from the matcher type dropdown once another option is selected.

To Reproduce
Steps to reproduce the behavior:

  1. Go to a table with Filters
  2. Click on 'Filter Icon'
    image
  3. Select any matcher type from the dropdown.
    image
  4. Now select "Select an Option"
    image
  5. Following error appears:
    image

Expected behavior
No error should appear.

Screenshots
image

In Filament v3 getRelationshipTitleColumnName has been replaced with getRelationshipTitleAttribute

Describe the bug
In Filament v3 getRelationshipTitleColumnName has been replaced with getRelationshipTitleAttribute
IN src/Concerns/HasClauses.php ::apply function this needs to be change.

Right now relationship is not working on filters.

To Reproduce
Steps to reproduce the behavior:

  1. Use relationship on filter, it will not work.

Expected behavior
Filter should work with relationship.

Screenshots
If applicable, add screenshots to help explain your problem.

Additional context
Add any other context about the problem here.

Use a custom form schema

I want to change the form:

  • Fieldset to a filament Group and use label

Problem is that the clauses and fields are protected methods so unable to do this.

Would you be open to a PR to make these public?

DateFilter::make('created_at')
    ->form(function(DateFilter $filter): array {
        return [
            Group::make()
                ->schema(array_merge([
                    Select::make('clause')
                        ->label($filter->getLabel())
                        ->options($filter->clauses()),
                ], $filter->fields()))
        ];
    })

Using Same Filter more than once using AND/OR operators

Describe the ideal solution or feature request

Adding AND/OR Button under the filter to generate another filter form to apply for the same table column

Difficulty, impact, and usage score

Technical difficulty User goals Usage frequency
Large Creating More advanced Data Table Filters Daily

How does this tie into our current project?

This is an enhancement for the project

Also if you can point me in right direction giving me some tips , I will happy to do a PR for this. I really appreciate your hard work for this package !

Thanks !

Please support tag system

Describe the ideal solution or feature request

Maintain Semantic Versioning for the package

Difficulty, impact, and usage score

Technical difficulty User goals Usage frequency
small Updating the package with composer Daily

How does this tie into our current project?

This will be useful for those who already using this great package !

I cannot pass BooleanFilter filters successfully on pest test

Hi @dmandrade, thank you very much for this useful package. You are doing a good job.

I'm having trouble with my BooleanFilter tests. It was working before I used filament-advancedfilter.

I wrote my tests as described in the filament documentation.

it('can filtering was done with is_active in the customers table.', function () {
    $customers = Customer::factory(10)->create();

    livewire(ListCustomers::class)
        ->assertCanSeeTableRecords($customers)
        ->filterTable('is_active')
        ->assertCanSeeTableRecords($customers->where('is_active', true))
        ->assertCanNotSeeTableRecords($customers->where('is_active', false));
});

The assertion assertCanNotNotSeeTableRecords($customers->where('is_active', false)) is currently failing when this test was running before.

The code I configured the filter is very simple. It is as follows.

BooleanFilter::make('is_active')

wire:model has tableFilters.is_active.clause. Can adding .clause cause this problem? Do you have a solution for this?

Laravel: v10.0.5
Filament: v2.17.23
Filament AdvancedFilter: v1.2.1

Is the NumberFilter capable of filtering related record counts?

Describe the bug
I have a table column that displays counts of related records and I'd like to be able to filter the table for a minimum or maximum value of that count.

To Reproduce
I'm using a TextColumn with the ->counts('') method to generate the number I'd like to sort

Expected behavior
I tried using the ->relationship() method but didn't see a way to get it to work.

If there IS a supported way to do this, maybe it would be good to add it as an example in the readme? I'd think it might be pretty common.

Thank you!

Filter layout

Describe the ideal solution or feature request

To have some filters in the comon dropdown and some filters above the table. Filament only allow all filters in the dropdown or above the table.

Difficulty, impact, and usage score

Technical difficulty User goals Usage frequency
Medium More customizable layout Daily

How does this tie into our current project?

This current package offers great filters. This feature request is about the layout (where the filters will be inserted) so it might be something new for this package (maybe it requires to extend Filament\Tables\Table).

Numeric filters ignore "0" input

Describe the bug
When attempting to use a NumberFilter, setting the value to "0" result in the filter not being applied.

To Reproduce
Steps to reproduce the behavior:

  1. Define a NumberFilter
  2. Visit the Resource Page
  3. Set a filter on the field, for example, "less than", with the value as 0
  4. Filter isn't applied

Expected behavior
The column should be filtered

Additional context
Current workaround is to input "-0" instead of 0, which isn't "friendly" to my end users.
This appears to happen because empty(0) evaluates to true.

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.