I tried to do some research online, but couldn't find an answer. Was the invention of table tennis based on tennis?
The game originated in England during the 1880s, where it was played among the upper-class as an after-dinner parlour game. It has been suggested that the game was first developed by British military officers in India or South Africa who brought it back with them. A row of books was stood up along the center of the table as a net, two more books served as rackets and were used to continuously hit a golf-ball from one end of the table to the other.
So imo, yes it is based on tennis since those military guys probably knew what the tennis was.
Hodges 1993, p. 2 Letts, Greg. "A Brief History of Table Tennis/Ping-Pong". About.com. The New York Times Company. WashingtonPost.com.
Most sources, including the history presented on the website of the International Table Tennis Federation (ITTF), agree that the game was developed in the 1880's as a variant to the already-popular lawn tennis, which in turn derives from so-called "real tennis", an earlier game, hailing back to medieval times, whose name is derived from French "Tenez!", meaning "Hold!", "Receive!" or "Take!".
The popularity of real tennis had declined during the 18th and early 19th centuries, but lawn tennis, the game we play today, was on the rise. The Wimbledon tournament was started in 1877, several years before table tennis' purported origins, showing that the sport was enjoying high popularity at the time. However, it was not the only racket-and-ball game played; also popular like stické, rackets and squash, which could certainly have inspired table tennis as much as lawn tennis did.
However, a good indicator that lawn tennis was the real source of inspiration lies in the name itself. Table tennis was known under many names, again according to the ITTF's website. These included "ping pong", "gossima", "whiff-whaff", "pim pam" and "pom-pom", most of which are onomatopoeic, but also "table tennis", "indoor tennis", "parlour tennis" and "tennis de salon", the large variety of names involving "tennis", combined with the lack of names like "table squash" or "parlour rackets", are a strong indicator that tennis, the then-popular lawn tennis rather than the antiquated real tennis, was the strong driving force behind the invention of the game.