Editor-NET: Filter on editor is not honored by SearchBuilder/SearchPanes
Editor-NET: Filter on editor is not honored by SearchBuilder/SearchPanes
When you apply a top level filter on a table, this is not taken into account by the options presented by SearchBuilderOptions or SearchPaneOptions.
TLDR: I have created an issue on the GitHub repository and also submitted a PR with my take on a fix.
Setup
Using the current example download for Editor. Showing this with SearchPanes because it is easier to see in the browser:
1. Modify Controllers\SearchPanesController.cs
to add a top level filter on site using the Where clause
var response = new Editor(db, "users")
.Model<UploadManyModel>()
.Where("site", "1", "=")
- Run the project and visit
/examples/extensions/searchPanes.html
Result
The resulting table shows the correct data set:
However, the SearchPanes options still show the options from the full data set:
This includes the other options like Name:
Selecting one of the pre-filtered names results in zero records found, while the options show there should be one.