waibu-db 2.26.2 → 2.26.4

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.
@@ -23,7 +23,7 @@ async function btnColumns () {
23
23
  if (isEmpty(this.params.attr.content)) this.params.attr.content = req.t('columns')
24
24
  for (const f of schema.view.fields) {
25
25
  // if (allFields.length > 0 && !allFields.includes(f)) continue
26
- const prop = schema.properties.find(p => p.name === f && !p.virtual)
26
+ const prop = schema.properties.find(p => p.name === f)
27
27
  if (!prop) continue
28
28
  const attr = { 'x-model': 'selected', label: req.t(get(schema, `view.label.${f}`, `field.${f}`)), value: f, labelText: 'nowrap' }
29
29
  if (fields.includes(f)) attr.checked = true
@@ -45,7 +45,7 @@ async function form () {
45
45
  if (v === true) attr[k] = true
46
46
  else attr[k] = v
47
47
  })
48
- if (['array', 'object'].includes(prop.type)) attr.col = '12-md'
48
+ if (['array', 'object', 'text'].includes(prop.type)) attr.col = '12-md'
49
49
  attr.label = this.component.req.t(attr.label)
50
50
  const xon = filter(xOns, { field: widget.name })
51
51
  for (const o of xon) {
@@ -18,6 +18,7 @@ async function addHandler ({ req, reply, model, params = {}, template, addOnsHan
18
18
  if (req.query.mode === 'clone' && req.query.id) {
19
19
  const resp = await getRecord({ model, req, id: req.query.id, options: { fields: map(schema.properties, 'name'), ...opts } })
20
20
  def = omit(resp.data, omitted)
21
+ if (def._fmt) def._fmt = omit(def._fmt, omitted)
21
22
  } else {
22
23
  const picked = map(schema.properties, 'name')
23
24
  def = omit(pick(req.query, picked), omitted)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "waibu-db",
3
- "version": "2.26.2",
3
+ "version": "2.26.4",
4
4
  "description": "DB Helper",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/wiki/CHANGES.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # Changes
2
2
 
3
+ ## 2026-06-24
4
+
5
+ - [2.26.4] Bug fix in ```wdb-btn-columns``` widget
6
+ - [2.26.4] Bug fix in ```wdb-forms``` widget
7
+
3
8
  ## 2026-06-19
4
9
 
5
10
  - [2.26.2] Bug fix in ```add-handler.js```