Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Pre-assign filters to specific columns during Grid rendering #104

Open
TimoSchmuck opened this issue Dec 5, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@TimoSchmuck
Copy link

I'm working on a project where users configure filters to facilitate future queries. I would like to know if there is a feature or method available in the package that allows pre-assigning a filter to a specific column during the rendering of the Grid.

This functionality would be extremely useful for my project, as it would help pre-configure the filters according to the user's needs, saving time and enhancing the overall experience.

I appreciate in advance any information or suggestions that may help achieve this goal.

By the way, I would like to take this opportunity to congratulate the team for the excellent work done on this package. The existing features are very useful and significantly contribute to the project's efficiency.

@TimoSchmuck TimoSchmuck added the enhancement New feature or request label Dec 5, 2024
@TimoSchmuck
Copy link
Author

TimoSchmuck commented Dec 5, 2024

One reason why I need this functionality is to allow for DeepLinks that points the user to a specific record. In order to achieve this I need to set the filters appropratly. So far I had no success.

Adding multiple events in the eventManager only results in the last filter set changed event to be applied:

WidgetsBinding.instance.addPostFrameCallback((timeStamp) {
      stateManager!.eventManager!.addEvent(
        PlutoGridChangeColumnFilterEvent(
            column: column[0],
            filterType: const PlutoFilterTypeContains(),
            filterValue: value0,
            debounceMilliseconds:
                stateManager!.configuration.columnFilter.debounceMilliseconds),
        );
        stateManager!.eventManager!.addEvent(
          PlutoGridChangeColumnFilterEvent(
              column: column[1],
              filterType: const PlutoFilterTypeContains(),
              filterValue: value1,
              debounceMilliseconds:
                  stateManager!.configuration.columnFilter.debounceMilliseconds),
        );
});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant