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

one-line fix to getting started documentation #143

Open
hoglund666 opened this issue Dec 31, 2023 · 0 comments
Open

one-line fix to getting started documentation #143

hoglund666 opened this issue Dec 31, 2023 · 0 comments

Comments

@hoglund666
Copy link

This one line fix to the getting started section of the docs would have saved me an hour:

The working code follows, where forecasts is an array of data items to display.

const data = { 
    nodes: forecasts 
};

and then this works,

return (
        <CompactTable columns={colDefs} data={data} theme={theme}></CompactTable>
);

BUT, the example initializes the data object like this:

 const data = { nodes };

Where nodes is an array of data items to display. The complete syntax would have been something like nodes: nodes but I guess javascript just took the shorthand. For quite some time I didn't realize I needed to put { nodes: my_array_name }.

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

No branches or pull requests

1 participant