dddeeemmmooonnn / nova-multicolumn-filter Goto Github PK
View Code? Open in Web Editor NEWA Laravel Nova multicolumn filter.
A Laravel Nova multicolumn filter.
Any plans to add support for Nova4?
Currently the "Add" and "Apply" buttons are hardcoded text. Would be great to use the language system to make them translateable to for example "Hinzufügen" und "Durchführen" in german.
Plus: Add a title "Remove filter" (also translateable) to the remove button.
Do you accept PR?
Thanks for the great customized option of all types of filters.
If we have to change the placeholder of the text box and select instead of "--" then how can we do?
Second Question:
Initially display the "Add" button can we display the first filter directly?
And any way to change the "Add" button text when no filter added? After adding one filter "Add" button text is Ok
Hello,
I have been using your package and I noticed this issue where the page number is being reset to 1 after going into the detail page of a resource and then back to index. I found that when I remove the code that pushes all the columns to rows[]
and handleChange()
being called in mounted()
it works. Would it okay to remove that and create a pull request?
Thanks
When I click the 'add' button, it's just closing the filter popup, rather than adding a way to add a new filter. This is Nova version 2.5.0.
Can you please make the Title "Nova Multicolumn Filter" translateable and can you please add a css class to the filter, so that we can easily change the styling of it by css?
NovaMulticolumnFilter class -> apply function
$val['operator'] isn't urldecoded, if I use other then LIKE operator I get an sql error on date fields.
I copy UserFilter
from readme and get error:
"message": "Cannot redeclare non static dddeeemmmooonnn\\NovaMulticolumnFilter\\NovaMulticolumnFilter::$default_column_type as static App\\Services\\ApplicationServices\\Nova\\Filters\\ApplicationContractMultiFilter::$default_column_type",
"exception": "Symfony\\Component\\Debug\\Exception\\FatalErrorException",
"file": "/var/www/app/app/MyMultiFilter.php",
"line": 9,
Great job with this package.
I know, its a multi column filter, but it would be great, if there would be an option, to only show a single filter and/or a single column (without selectbox).
Let my show you, what I mean. This is my class:
class MyFilter extends NovaMulticolumnFilter {
protected $columns = [
'model_id' => [
'label' => 'Tabellen-ID',
'defaultOperator' => '=',
'preset' => true,
],
];
public $name = "Tabellen-ID";
protected function operatorsDefault() {
return [
'=' => '=',
];
}
}
which results into this (with custom colors of course):
Since I have only one column, it would be great, if you wouldn't see an Selectbox, but just the name of the column. Something like this:
or alternativly, allow to hide this first selectbox, since you can already set the filter name (public $name = "Tabellen-ID";
):
It would be great, if we could disable the add and remove buttons, since in the case you only have one column to filter and set it as preset
, then this would be a nice enhancement:
In case you only have one operator, there is no need for a selectbox, so please allow to disable (aka hide) it
When you have set your filter and then click on top of the filter flyout on "Reset Filters", then the table is refreshed and the filter number indicator bubble is set to 0, but the filter nova-multicolumn-filter
is still shown and the input/selectboxes are still filled with the values.
It would be handy to have the option to use this filter with aliased columns, eg count(id) AS totals
, which would require supporting the HAVING totals > 100
SQL query
Hi,
I have a filter with this column:
protected $columns = [ 'province' => [ 'type' => 'select', 'options' => [ 'Almería' => 'Almería', 'Madrid' => 'Madrid', 'Ciudad Real' => 'Ciudad Real' ], 'label' => 'Province', ] ];
When I select 'Madrid' the select field shows 'Madrid', but if I select an option with accents or blanks like 'Almería' or 'Ciudad Real', the select field shows empty, although the data is filtered correctly.
The problem is that the user does not know what option has selected.
Best regards and thank you for this Nova package.
On your novapackages page for this repo, you have entered the link incorrectly, missing out the final "r" in "filter".
Current link
https://github.com/dddeeemmmooonnn/nova-multicolumn-filte
Should be:
https://github.com/dddeeemmmooonnn/nova-multicolumn-filter
I am trying to figure out how to implement the eloquent method whereIn
in combination with an input field where the input is split by some delimiter.
Imagine a filter like so:
id
in
"1,2,3"
which would add the following query:
$query->whereIn('id', [1, 2, 3]);
where the array of id's are retrieved as
$values = explode($delimiter=',', $value);
This would make it possible to filter a resource based on an array of id's for example.
Do you have any pointers as how to implement something like this using your package? Thanks.
Hello
Even when no filter is selected, it adds a very long query string to the URL.
That is not super user-firendly, and also if we have the Nova Scroll To Top package, and haven't disabled it for the "on route change", it will trigger a scroll to the top every time we open relation tab when we are inside a resource details.
So is there a way to not add that query string when the user hasn't selected any filter yet ?
Thanks for you work !
result:
UI displays the last filter removed (filter2 in this case)
if you refresh the page it is corrected
expected:
UI should display filter1 removed
Hi.
It's not a bug report, just want to ask how can we use the filters?
Like I'm new in nova and I'm confused.
Where do I need to put this kind of code?
new NovaMulticolumnFilter([
'column' => '', //columns
],
$manual_update = false, // Apply filter with the button
$default_column_type = 'text', // Default input type
$name = 'filter' // Filter name
),
or if I wanna create a new one how can I use it?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.