作者:东莞家装_670 | 来源:互联网 | 2023-09-25 17:10
When searching for a match, the
tags are placed around the matching text. When I trim the value the user entered, all the rest of your demo code remaining the same, I see the following when I enter "A " (an 'A' followed by two spaces). At this point you'll see
in the popup container. Keep pressing space and you'll notice the html tags being pushed off one-by-one.
I even recreated this on your demo site by modifying this line of code in
:
1
| let query = new RegExp(context.asyncSelected, 'ig'); |
new code:
1
| let query = new RegExp(context.asyncSelected.trim(), 'ig'); |
I dug in a little bit, but not much. We're mostly trying to make this more friendly for a user who may not be able to see that they've typed in a trailing space.
该提问来源于开源项目:valor-software/ngx-bootstrap
Closed as can't reproduce (version 2.0.0-beta-8), will be reopened if we have sample to reproduce