We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
onClick: <D>(info: PickInfo<D>, e: MouseEvent) => any; 2244:deck.gl__core
onClick: <D>(info: PickInfo<D>, e: MouseEvent) => any;
RE this guy in the DeckGL Core types, i cant figure out how to pass the "D" Generic type to the prop
Here is a snippet of the code
<DeckGL<any> ref={deckRef} viewState={mapViewport} controller layers={deckLayers} ContextProvider={MapContext.Provider} onWebGLInitialized={setGLContext} onClick={<DeviceData>(clickInfo) => { console.log(clickInfo) }} />
The text was updated successfully, but these errors were encountered:
Hi @danmarshall , any help on this would be appreciated
Sorry, something went wrong.
H1 @SadikMoazzem , this is quite puzzling. Hopefully another community member can chime in, or you can try Stack Overflow.
Here's the best I can do:
interface DeviceData { abc: number; }
<DeckGL<any> onClick={((clickInfo) => { const deviceData = clickInfo.object as unknown as DeviceData; console.log(deviceData.abc) })} />
I'll try that out. Thanks for the quick reply!!
I was assuming as the type for the onClick allowed to pass in a Type that i was just missing a trick
No branches or pull requests
onClick: <D>(info: PickInfo<D>, e: MouseEvent) => any;
2244:deck.gl__core
RE this guy in the DeckGL Core types, i cant figure out how to pass the "D" Generic type to the prop
Here is a snippet of the code
The text was updated successfully, but these errors were encountered: