Adding onSelectedItem function that can be passed by the developer (later) .
The function[onItemSelected] is callback function, which is called when selecting an item from the items list.
in other words when selecting an item the [onItemSelected] function will be called immediately and it return [PlutoGridOnSelectedEvent] event, so you you can use it make decisions.
for example:
let's assume that i want to print a string base on the user's selction, if the user chooses programming I will print "Hello programmer", else I will print "Hello Developer". Bys using the onSelectedItem function we can do this using the following simple code:
Adding onSelectedItem function that can be passed by the developer (later) .
The function[onItemSelected] is callback function, which is called when selecting an item from the items list. in other words when selecting an item the [onItemSelected] function will be called immediately and it return [PlutoGridOnSelectedEvent] event, so you you can use it make decisions.
for example: let's assume that i want to print a string base on the user's selction, if the user chooses programming I will print "Hello programmer", else I will print "Hello Developer". Bys using the onSelectedItem function we can do this using the following simple code:
Actually we can use this function in many ways, for example to change other cells data based on the user selection and so many other scenarios.