feat(grid): add select/combo editor types for category products inline edit#157
Open
Ibochkarev wants to merge 1 commit intobetafrom
Open
feat(grid): add select/combo editor types for category products inline edit#157Ibochkarev wants to merge 1 commit intobetafrom
Ibochkarev wants to merge 1 commit intobetafrom
Conversation
…e edit - Add editor_type: select with editor_options for static options (e.g. made_in) - Add editor_type: combo with editor_combo_endpoint for API-loaded options (e.g. vendor_id) - Validate editor_combo_endpoint when combo type is selected - Add showClear for combo Select to allow clearing nullable fields - Toast notification on combo options load failure - Lexicons: editor_type_select, editor_type_combo, editor_options, editor_combo_endpoint, editor_combo_endpoint_required, combo_options_load_failed Refs #155
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Описание
Добавлена поддержка select и combo редакторов для inline-редактирования в таблице товаров категории (issue #155). Расширяет базовую реализацию из PR #134.
Select — для полей с фиксированным набором значений (например,
made_in):editor_type: 'select'в настройках поляeditor_options: [{label, value}, ...]— JSON-массив вариантовSelectпри inline-редактированииCombo — для полей-ссылок на сущности (например,
vendor_id→ msVendor):editor_type: 'combo'сeditor_combo_endpoint(API для загрузки опций)Selectс опциями из API,showClearдля сброса nullable-полейms3.combo.Vendorиз ExtJSТип изменений
Связанные Issues
Closes #155
Как это было протестировано?
Проверено:
editor_type: selectиeditor_optionsв настройках гридаeditor_type: comboиeditor_combo_endpoint(например,/api/mgr/references/vendors)made_in(select) иvendor_id(combo)Конфигурация тестирования:
Скриншоты (если применимо)
Чеклист
Дополнительные заметки
GridConfigServiceсохраняетeditor_type,editor_options,editor_combo_endpointв configReferencesController::getVendorsвозвращает{vendors: [{id, name}]}— совместимо сnormalizeComboResponseProductDataService::$allowedUpdateFieldsуже включаетvendor_id,made_in