Skip to content

Commit 7ae1ddd

Browse files
MarcFabrealexyca
andauthored
Improve select margin, mapping usage + add transparent bg for option that caused issues on dark theme (#124)
Co-authored-by: Alexy Carlier <alexy.carlier@gmail.com>
1 parent 607d6d3 commit 7ae1ddd

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

AI.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ A customizable select element that supports single and multiple selection with a
143143
- searchBorderLeft: `Border` - Left border when split
144144
- searchBorderRadius: `string` - Border radius. Default: `'0px'`
145145
- searchPadding: `string` - Padding. Default: `'0px'`
146-
- searchMargin: `string` - Margin. Default: `'0px'`
146+
- searchMargin: `string` - Margin. Avoid horizontal margin as dropdown padding already give space between search and dropdown. Default: `'0px'`
147147
- searchOutline: `Border` - Outline style
148148
- searchOutlineOffset: `string` - Outline offset
149149
- searchFontFamily: `string` - Font family
@@ -197,4 +197,9 @@ If user asks for multi lang support, you can use globalContext page lang and set
197197
- dynamicConfiguration: {"content": {"choices": [{"key": "emoji","type": "Text"},{"key": "label","type": "RawObject"},{"key": "value","type": "Text"}]}}
198198
- mappingLabel: {"js": "return context.mapping?.['emoji']+ ' ' +context.mapping?.['label'] ?.[ globalContext.page?.['lang'] ]"}
199199

200-
</elements>
200+
***Notes:***
201+
202+
**CRITICAL** : mappingLabel + mappingValue are 'Formula' type like : {"type":"js","code":"//code"). It's not bindings ! So do not use __wwtype key.
203+
**CRITICAL** : If choices is an array of *objetcs*, you better use a specific field for mappingLabel and mappingValue like context.mapping?.['id'] etc. Do not use the whole context.mapping in this case.
204+
**CRITICAL** : labels are always text, no img, no icons, no html etc. Do never attempts to return html in mappingLabel.
205+
**CRITICAL** : You have to perfectly style this select according to the page.

ww-config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2011,7 +2011,7 @@ export default {
20112011
en: 'background color',
20122012
},
20132013
type: 'Color',
2014-
defaultValue: 'white',
2014+
defaultValue: undefined,
20152015
states: true,
20162016
classes: true,
20172017
bindable: true,

0 commit comments

Comments
 (0)