I did mine this way too. Some say it's not wize because you run the risk of flood. I have two floats. If the first sticks the second one will kick in and shut it off. And my solenoid is normally closed, making the risk of it sticking open slim to none. Thirdly, my sump is in the basement so if by some extreme chance something goes wrong, a flood is not overly critical. So far the system has been running great for 2 years.
So first and foremost, you need a normally closed (NC) solenoid. Run your tap water to the solenoid. Then the solenoid feeds the RO. The float should should be normally open (NO). When the water in the sump drops, the float closes and energizes the solenoid thus opening the water flow to the RO. Once the sump rises, the float opens again and the power to the solenoid is cut off and resumes it's normally closed state, thus cutting off the water supply to the RO. In addtion, I'm not a fan of running 110v thru the switch so mine operates on low voltage with another switch to activate the 110v.