T
T
titiba86922022-02-22 14:01:58
Bitrix24
titiba8692, 2022-02-22 14:01:58

How to apply filter via JS in main.ui.filter?

$APPLICATION->includeComponent(
    "bitrix:main.ui.filter",
    "",
    [
        "FILTER_ID" => "DEMO_FILTER",
        "GRID_ID" => "DEMO_GRID",
        // ...
    ]
);

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
IgorVader, 2022-02-22
@titiba8692

let filter = BX.Main.filterManager.getById('ИД ФИЛЬТРА');
  let values = filter.getFilterFieldsValues();
  
   values['НАЗВАНИЕ ПОЛЯ'] = 'Значение для фильтра ';

  filter.getApi().setFields(values);
  filter.getApi().apply();

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question