Select grid-cells via drag


I am a backend dev with rudimentary knowledge of Ionic.
I need to create a grid-like UI-component, let’s say 4 col x 50 rows, with the requirement for the user to click-down on one of the cells and drag.
The UI should then select all cells between the first-clicked cell and the drag-point, until user clicks-up.

Can you kindly give me a hint how to start this?