Add documentation for hideSelectionFromResult function

Add documentation and example for the `hideSelectionFromResult` function.