qor / admin

Qor Admin - Instantly create a beautiful, cross platform, configurable Admin Interface and API for managing your data in minutes.
918 stars 189 forks source link

Clear Filters #254

Open NilsJPWerner opened 3 years ago

NilsJPWerner commented 3 years ago

It would be great to be able to add a clear filter and/or clear all filters button to qor.

NilsJPWerner commented 3 years ago

I was able to create a hacky solution by adding this action:

    resource.Action(&admin.Action{
        Name: "Clear Filters",
        URL: func(record interface{}, context *admin.Context) string {
            return context.Request.URL.Path
        },
        Modes: []string{"collection"},
    })