Question on usage of PeriodicTable #181
-
|
Hi, I would like to ask is there something like on:click implemented for single element cell so can I track which element was clicked/selected? |
Beta Was this translation helpful? Give feedback.
Answered by
janosh
Oct 20, 2025
Replies: 1 comment
-
|
yep, you can pass <script>
import { PeriodicTable } from 'matterviz'
const heatmap_values = { H: 2, O: 1 }
const onclick = console.log
</script>
<PeriodicTable
{heatmap_values}
tile_props={{ onclick }}
> |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
janosh
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
yep, you can pass
tile_props.onlick.