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

api for ag grid #1086

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

api for ag grid #1086

wants to merge 4 commits into from

Conversation

tgberkeley
Copy link
Collaborator

No description provided.

@tgberkeley tgberkeley changed the title first version api for ag grid Nov 13, 2024
@tgberkeley tgberkeley marked this pull request as ready for review November 14, 2024 02:12
@tgberkeley
Copy link
Collaborator Author

This PR requires a new version of reflex-ag-grid to be released!


The react code for the `select_all()` event handler is `selectAll = (source?: SelectionEventSourceType) => void;`.

To use this in Reflex as you can see, it should be called in snake case rather than camel case, and as it returns `void` this means that the function should be called with no arguments.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The void means it doesn't return anything. The source? indicates that it takes an optional source argument

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed


Since Reflex AG Grid is wrapping the underlying AG Grid library, there is much more functionality available that is currently not exposed in Reflex. Check out this [documentation](https://www.ag-grid.com/react-data-grid/reference/) for more information on what is available in AG Grid.

As Reflex does not expose all the functionality of AG Grid, you can use `ag_grid.api()`, which is a property of the `ag_grid` component, to access the underlying AG Grid API. This allows you to access the full functionality of AG Grid.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

which is a property of the ag_grid component

Technically this is also true, but this page describes the api class that's hanging off the ag_grid namespace

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

)
```

The react code for both of these is shown below. The key point to see is that both of these functions return `void` and therefore should be called with no arguments.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

again here, the void is for the return. the arguments accepted are listed in the parentheses

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

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

Successfully merging this pull request may close these issues.

2 participants