Wijmo itemsSourceFunction unexpected behaviour

Posted by: n.nikolic on 30 May 2018, 12:51 pm EST

    • Post Options:
    • Link

    Posted 30 May 2018, 12:51 pm EST

    Hi,

    Why itemsSourceFunction of the AutoComplete component is adding backward slash when you query for the terms that contain ‘.’ and ‘-’.

    So, search term ‘test -’ becomes ‘test -’ as a query parameter of the itemsSourceFunction.

    Is this by design? If it is by design I would like to know the explanation and what is the logic behind it, and

    how to prevent this from happening?

    Is there a way to just get what you typed for as query parameter of the itemsSourceFunction?

    I’m using Wijmo version 5.20181.436-rc with Angular 5.

    Thanks in advance.

  • Posted 31 May 2018, 8:23 am EST

    Hi,

    The following behaviour is by design to escape the RegEx characters in the query.

    If you want to get the original text back then you can use following RegEx:-

    var originalText = query.replace(/\([.?*+^$\(){}|-])/g,“$1”);

    ~Manish

  • Posted 31 May 2018, 9:44 am EST

    Thank you.

Need extra support?

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

Learn More

Forum Channels