@symbo.ls/select 2.31.23 → 2.31.26

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.js +12 -5
  2. package/package.json +3 -3
package/index.js CHANGED
@@ -14,17 +14,24 @@ export const Select = {
14
14
  tag: 'option',
15
15
  attr: {
16
16
  text: ({ props }) => props.text || props.value,
17
- value: ({ props }) => props.value,
18
- selected: ({ props }) => props.selected,
19
- disabled: ({ props }) => props.disabled
17
+ required: (el) => el.call('exec', el.props.required),
18
+ disabled: (el) => el.call('exec', el.props.disabled),
19
+ value: (el) => {
20
+ if (!el.props || !el.props.value) return
21
+ const val = el.call('exec', el.props.value, el)
22
+ if (el.call('isString', val) && val.includes('{{')) {
23
+ return el.call('replaceLiteralsWithObjectFields', val)
24
+ }
25
+ return val
26
+ }
20
27
  }
21
28
  }
22
29
  },
23
30
 
24
31
  attr: {
25
- required: ({ props }) => props.required,
26
32
  name: ({ props }) => props.name,
27
- disabled: ({ props }) => props.disabled,
33
+ required: (el) => el.call('exec', el.props.required),
34
+ disabled: (el) => el.call('exec', el.props.disabled),
28
35
  value: (el) => {
29
36
  if (!el.props || !el.props.value) return
30
37
  const val = el.call('exec', el.props.value, el)
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@symbo.ls/select",
3
- "version": "2.31.23",
3
+ "version": "2.31.26",
4
4
  "main": "index.js",
5
5
  "license": "MIT",
6
- "gitHead": "c3e317ebd579c68f00b0cea794458456819b4279",
6
+ "gitHead": "126577d65a218af7e2f66b0a3f9691942ee8b9d2",
7
7
  "dependencies": {
8
- "@symbo.ls/atoms": "^2.31.23"
8
+ "@symbo.ls/atoms": "^2.31.26"
9
9
  },
10
10
  "source": "src/index.js"
11
11
  }