Skip to content

Commit 413217f

Browse files
committed
remove deprecated property
1 parent d8a64fd commit 413217f

2 files changed

Lines changed: 2 additions & 14 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ This is a major release, and it might be not compatible with your current usage
6262
- `autoCompleteFieldUtils`: use `suggestFieldUtils`
6363
- `CodeMirror.outerDivAttributes`: use all properties directly on `CodeEditor`
6464
- `MultiSuggestField.ofType`: use `<MultiSuggestField<TYPE>>`
65+
- `StringPreviewContentBlobToggler.firstNonEmptyLineOnly`: use `useOnly="firstNonEmptyLine"`
6566
- color configuration is not possible anymore via previously used SCSS variables
6667
- `$eccgui-color-primary`, `$eccgui-color-primary-contrast`, `$eccgui-color-accent`, `$eccgui-color-accent-contrast`,
6768
`$eccgui-color-success-text`, `$eccgui-color-success-background`, `$eccgui-color-info-text`, `$eccgui-color-info-background`,

src/cmem/ContentBlobToggler/StringPreviewContentBlobToggler.tsx

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ export interface StringPreviewContentBlobTogglerProps extends Omit<
2222
/**
2323
* Use only parts of `content` in the preview.
2424
* `firstMarkdownSection` uses the content until the first double line return.
25-
* Currently overwritten by `firstNonEmptyLineOnly`.
2625
*/
2726
useOnly?: "firstNonEmptyLine" | "firstMarkdownSection";
2827
/**
@@ -38,12 +37,6 @@ export interface StringPreviewContentBlobTogglerProps extends Omit<
3837
* This allows to add non-string elements to both the full-view content and the pure string content.
3938
*/
4039
noTogglerContentSuffix?: React.JSX.Element;
41-
/**
42-
* If only the first non-empty line should be shown in the preview.
43-
* This will in addition also be shortened according to `previewMaxLength`.
44-
* @deprecated (v26) use `useOnly="firstNonEmptyLine"` instead
45-
*/
46-
firstNonEmptyLineOnly?: boolean;
4740
}
4841

4942
/** Version of the content toggler for text centric content. */
@@ -59,16 +52,10 @@ export function StringPreviewContentBlobToggler({
5952
renderPreviewAsMarkdown = false,
6053
allowedHtmlElementsInPreview,
6154
noTogglerContentSuffix,
62-
firstNonEmptyLineOnly,
6355
...otherContentBlobTogglerProps
6456
}: StringPreviewContentBlobTogglerProps) {
65-
// need to test `firstNonEmptyLineOnly` until property is removed
66-
const useOnlyTest: StringPreviewContentBlobTogglerProps["useOnly"] = firstNonEmptyLineOnly
67-
? "firstNonEmptyLine"
68-
: useOnly;
69-
7057
let previewString = content;
71-
switch (useOnlyTest) {
58+
switch (useOnly) {
7259
case "firstNonEmptyLine":
7360
previewString = useOnlyPart(content, regexFirstNonEmptyLine);
7461
break;

0 commit comments

Comments
 (0)