in `handleSelectedRangesChanged`: Using getDataLength() instead, so we support both dataView and static data sets.