Editor-NET: Filter on editor is not honored by SearchBuilder/SearchPanes

Editor-NET: Filter on editor is not honored by SearchBuilder/SearchPanes

parcivalparcival Posts: 28Questions: 8Answers: 0
edited January 13 in Bug reports

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", "=")
  1. Run the project and visit /examples/extensions/searchPanes.html

Result

The resulting table shows the correct data set:
image

However, the SearchPanes options still show the options from the full data set:
image

This includes the other options like Name:
image

Selecting one of the pre-filtered names results in zero records found, while the options show there should be one.

Sign In or Register to comment.