Changing the library in the Swap component menu cleared the search
field, so checking several connected libraries for the same component
meant typing the name again for each one. Keep the term and reset only
the library id and the group path, so the new library is shown already
filtered.
Closes#12335
AI-assisted-by: claude-opus-5-5
Signed-off-by: JiMyung Lee <lee.ji.myung@gmail.com>