Skip to content

Commit

Permalink
Disable DropDownMenu for wearable profile.
Browse files Browse the repository at this point in the history
Issue: #210
Problem: Drop Down Menu for wearable profile is not supported
Solution:
 - Configure DropDownMenu only for mobile profile
 - fix for Component selection for different profiles
 - added profie configuration for Selector refering to this patch

Signed-off-by: Tomasz Lukawski <t.lukawski@samsung.com>
  • Loading branch information
TomaszLukawskiSam authored and lmslachciak committed Jul 22, 2019
1 parent 20855fe commit a69cb2a
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 11 deletions.
22 changes: 11 additions & 11 deletions design-editor/src/panel/property/component/component-element.js
Original file line number Diff line number Diff line change
Expand Up @@ -268,17 +268,17 @@ class Component extends DressElement {
* @private
*/
_selectComponentsToDeviceProfile(componentInfo) {
var self = this,
components = {},
comp = null;

for (comp in componentInfo) {
let componentProfileList = componentInfo[comp].options[DEVICE_PROFILE_OPTION];
if (!componentProfileList || componentProfileList.indexOf(self._profile) !== -1) {
components[comp] = componentInfo[comp];
}
}
return components;
let components = {},
comp = null,
screen = StateManager.get('screen');

for (comp in componentInfo) {
let componentProfileList = componentInfo[comp].options[DEVICE_PROFILE_OPTION];
if (!componentProfileList || componentProfileList.indexOf(screen.profile) !== -1) {
components[comp] = componentInfo[comp];
}
}
return components;
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
},
"template": "<select data-native-menu=\"false\" data-inline=\"true\" data-items=\"Add values\"></select>",
"version": "mobile",
"device-profile": "mobile",
"generator": {
"constructor": "tau.widget.DropdownMenu",
"parameter": {
Expand Down
1 change: 1 addition & 0 deletions tau-component-packages/components/selector/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"selectoritem"
],
"version": "wearable-circle",
"device-profile": "wearable",
"data": [
{
"option": "item-selector",
Expand Down

0 comments on commit a69cb2a

Please sign in to comment.