Retain child record selection in a drawer

Added a drawer to a table to show related records for an object…After selection of child records for one of the primary object records,if child records are selected for a second primary object record then the child record selection of first record disappears…How to retain child record selection for multiple record?