Skip to content

TabBox.ts: support mark strategy#2229

Merged
cguglielmo merged 3 commits into
releases/26.2from
features/cgu/26.2/tabbox_mark_strategy_417769
Jun 22, 2026
Merged

TabBox.ts: support mark strategy#2229
cguglielmo merged 3 commits into
releases/26.2from
features/cgu/26.2/tabbox_mark_strategy_417769

Conversation

@cguglielmo

Copy link
Copy Markdown
Member

Also update empty property and parent fields similar to the saveNeeded property. For example: GroupBox.empty will return true if all fields are empty and return false if at least one field has a value.

417769

@cguglielmo cguglielmo force-pushed the features/cgu/26.2/tabbox_mark_strategy_417769 branch 8 times, most recently from c3801c1 to 024aa2c Compare June 12, 2026 15:43
Comment thread eclipse-scout-core/src/form/fields/FormField.ts Outdated
Comment thread eclipse-scout-core/src/form/fields/FormField.ts Outdated
Comment thread eclipse-scout-core/src/form/fields/tabbox/TabBox.ts
Comment thread eclipse-scout-core/src/form/fields/tabbox/TabBox.ts
Also set it to warn because it is only code style.
Changed no-var to error because it must not be used.

423213
If a value is set during _init(), groupBox.saveNeeded is true but
form.saveNeeded is false. This is inconsistent and has the effect that
form.saveNeeded won't turn true even if the user enters data because
there won't be a property change event from the root group box.
This only affects forms that are not loaded, for example if it is
embedded in a WrappedFormField.

417769
@cguglielmo cguglielmo force-pushed the features/cgu/26.2/tabbox_mark_strategy_417769 branch 2 times, most recently from 2a96e5e to 189c055 Compare June 18, 2026 06:55
The Scout JS TabBox now supports marking the tab items that have content
(markStrategy = NOT_EMPTY) or need to be saved
(markStrategy = SAVE_NEEDED), like the Scout Classic TabBox already
does.

The default strategy is NOT_EMPTY. For tab boxes inside a Search Form it
is SAVE_NEEDED.

Also:
- Update empty property for composite fields similar to the
  saveNeeded property. For example: GroupBox.empty will return true if
  all fields are empty and return false if at least one field has a
  value.
- CheckBoxField.empty will now return true if the value is false or
  null instead of false.
- LabelField and HtmlField set checkEmpty to false
  These fields are typically used to show info messages and don't have
  actual content. In the rare case where the empty state is important
  it can be set to true again.
- HtmlField now uses has-text css class instead of empty to determine
  whether the placeholder should be shown. This makes it possible to
  disable the empty property (e.g. by using checkEmpty = false) but
  still get the placeholder if the field doesn't have text.
- Rename MarkStrategy.EMPTY to NOT_EMPTY because it is marked if it is
  _not_ empty.

417769
@cguglielmo cguglielmo force-pushed the features/cgu/26.2/tabbox_mark_strategy_417769 branch from b1d667e to cda63b1 Compare June 18, 2026 14:01
@cguglielmo cguglielmo merged commit e5b63d5 into releases/26.2 Jun 22, 2026
4 checks passed
@cguglielmo cguglielmo deleted the features/cgu/26.2/tabbox_mark_strategy_417769 branch June 22, 2026 06:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants