Last active
November 12, 2018 11:28
-
-
Save Yvelious/581ee0f33f1943ae5f54d431e3068014 to your computer and use it in GitHub Desktop.
SMT: item-filter
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name // это лэйбл | |
type // Один из типов: select, input, multiple_select(мультиселект) | |
url // Путь откуда тянутся данные через ajax для селекта | |
api // Идентификатор, если используется внешний API, к примеру import-api | |
options // Если селект и есть список опций для этого селекта | |
field // Идентификатор селекта |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Пример формата данных, которые мне нужны с бэка, для реализации блока Item Filters. | |
// Приходить данные должны по этому запросу /v1/sale-select-options. | |
[{ | |
"name": "Brand", | |
"field": "manufacturer", | |
"type": "multiple_select", | |
"url": "/product-import/v1/data-provider/manufacturer", | |
"api" : 'import-api', | |
"options": { | |
"1": "value", | |
"2": "value" | |
} | |
}, | |
{ | |
"name": "Category", | |
"field": "category", | |
"type": "multiple_select", | |
"url": "/product-import/v1/data-provider/products", | |
"api" : 'import-api', | |
"options": { | |
"1": "value", | |
"2": "value" | |
} | |
}] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment