Skip to content

Commit

Permalink
Update ITwinGridProps accessToken documentation to specify memoization (
Browse files Browse the repository at this point in the history
#134)

* Update ITwinGridProps accessToken documentation to specify memoization requirement

* Clarify memoization requirement in access token documentation for ITwinGridProps and IModelGridProps
  • Loading branch information
arome authored Dec 11, 2024
1 parent 033032f commit c69284d
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "@itwin/imodel-browser-react",
"comment": "Update access token docs for iTwinGrid and iModelGrid",
"type": "none"
}
],
"packageName": "@itwin/imodel-browser-react"
}
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export interface ITwinGridStrings {
}

export interface ITwinGridProps {
/** Access token that requires the `itwins:read` scope. Provide a function that returns the token to prevent the token from expiring. */
/** Access token that requires the `itwins:read` scope. Provide a function that returns the token to prevent the token from expiring. Function must be memoized. */
accessToken?: string | (() => Promise<string>) | undefined;
/** Type of iTwin to request */
requestType?: "favorites" | "recents" | "";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import { useIModelData } from "./useIModelData";
import { useIModelTableConfig } from "./useIModelTableConfig";
export interface IModelGridProps {
/**
* Access token that requires the `imodels:read` scope. Must be memoized. Provide a function that returns the token to prevent the token from expiring. */
* Access token that requires the `imodels:read` scope. Provide a function that returns the token to prevent the token from expiring. Function must be memoized. */
accessToken?: string | (() => Promise<string>) | undefined;
/** ITwin Id to list the iModels from (mutually exclusive to assetId) */
iTwinId?: string | undefined;
Expand Down

0 comments on commit c69284d

Please sign in to comment.