Unable to exclude points from a plot if the dataset is reactive

I have been trying to build a shiny app that allows the user to exclude points from a scatterplot by clicking on the point. I am able to get the functionality to work if the dataset is not reactive, but if it is reactive (taken as input via Fileinput & read.csv), then I get an error. I am providing the two sets of codes.
I have raised a Stackoverflow query related to the same along with a minimum reproducible example.

https://stackoverflow.com/questions/51577309/unable-to-exclude-points-from-a-plot-if-the-dataset-is-reactive