Skip to content

AG-Grid how to set filterParams #255

Closed Answered by falkoschindler
cryptedx asked this question in Q&A
Discussion options

You must be logged in to vote

As long as your filter params are JSON-serializable, you can simply set them as a dictionary:

ui.table({
    'columnDefs': [
        {
            'field': 'name',
            'filter': 'agTextColumnFilter',
            'filterParams': {'buttons': ['reset', 'apply']},
        },
    ],
    'rowData': [
        {'name': 'Alice'},
        {'name': 'Bob'},
        {'name': 'Carol'},
    ],
})

On the other hand, setting functions like a comparator does not work with the current version of NiceGUI.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by cryptedx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants