TabBox.ts: support mark strategy#2229
Merged
cguglielmo merged 3 commits intoJun 22, 2026
Merged
Conversation
c3801c1 to
024aa2c
Compare
mvilliger
approved these changes
Jun 16, 2026
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
2a96e5e to
189c055
Compare
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
b1d667e to
cda63b1
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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