Skip to Content
avatar image
Former Member

SAPUI5 SmartFilterBar setFilterData Issue

Hello experts,

I am making a demo of SmartFilterBar. I am having a smart filter and a smart table which works fine. And I want to specify the filter programmingly. I am doing it this way:

filter.setFilterDataAsString('{"CompanyName":{"value":"sap","ranges":[],"items":[]}}', true);

But after that,

  1. the new filter data does not show from UI,
  2. the smart table area turns to gray,
  3. the table data does not refresh.

I also tried method setFilterData the same way, but got same result.

Could anyone help?

Thanks in advance


Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Dec 20, 2017 at 08:20 PM

    Hi XG Liu,

    Could you share your project on Github for us to take a look or debug?

    Smart components work best while using Odata v4 with annotations. So you don't need to code filters manually.
    However it is possible to create a Smart Table app with filters manually. But you will have to take care of a lot of stuff manually.

    I have found that each time I need to deal with a SmatTable app I really need to dig deep into the debugger to understand what it needs to be done.


    Add comment
    10|10000 characters needed characters exceeded