Skip to content

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 tgberkeley requested a review from masenf 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

@tgberkeley tgberkeley merged commit 9047338 into main Nov 26, 2024
4 checks passed
@Kastier1 Kastier1 deleted the api-for-ag-grid branch January 25, 2025 01:54
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.

3 participants