Bento combo box removing extra white spaces during data binding

Posted by: nagaprasannakumar.katakam on 24 April 2020, 10:10 am EST

  • Posted 24 April 2020, 10:10 am EST

    Hi Team,

    We have recently come across an issue when we are trying to filter a data source based on combo box selected item text.

    • “The data source contains few items with multiple spaces(2 consecutive white spaces).The same data source is binded to combo box”

    • “But when the data is binded to combo box extra spaces are removed(instead of two white spaces only one white space is appearing) .”

    Is it the default behavior of the combo box control?

    Is there any way we can restrict this particular action of removing extra white spaces?

  • Posted 27 April 2020, 1:26 am EST

    Hi,

    We tried to replicate the issue at our end. It seems that the data displayed in the drop-down does not have multiple spaces but the actual selected item contains as many spaces as provided.

    It seems that the issue is not in ComboBox but in HTML itself. When we add some HTML containing multiple spaces, it deletes and whitespace into a single whitespace.

    Refer to the link below:

    https://stackblitz.com/edit/js-pw6z5k

    In this sample, observe that if we set the selectedItem as innerHTML of a

    element, then it is displayed as a single whitespace but if we set it in the input element, then all the whitespaces are reserved.

    Regards,

    Ashwin

  • Posted 27 April 2020, 2:13 am EST

    Thanks for your reply Ashwin.

    We will go through the link shared and get back to you in case of any queries.

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels