Skip to content

SearchPanes and SearchBuilder do not consider pre-filtering of the table. #11

@gotmoo

Description

@gotmoo

When you apply a top level filter on a table, this is not taken into account by the options presented by SearchBuilderOptions or SearchPaneOptions.

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.

Expected behavior

Pre-filtered items are hidden from the SearchPane/SearchBuilder options.

This could result in data leaking, or weird results from logically deleted records.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions