diff --git a/CHANGELOG.md b/CHANGELOG.md index 2b296e236..04bf15d74 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,8 @@ This is a major release, and it might be not compatible with your current usage ### Added - Extended existing height and readOnly props from `CodeEditorProps` to `AutoSuggestionProps` & `ExtendedCodeEditorProps` to be configurable from `` +- `: + - outerDivAttributes parameter: Allows to set parameter of the container div element of the code complete field. ## [24.3.0] - 2025-06-05 diff --git a/src/components/AutoSuggestion/AutoSuggestion.tsx b/src/components/AutoSuggestion/AutoSuggestion.tsx index f39ab3f6b..d7717a6ea 100644 --- a/src/components/AutoSuggestion/AutoSuggestion.tsx +++ b/src/components/AutoSuggestion/AutoSuggestion.tsx @@ -170,6 +170,8 @@ export interface AutoSuggestionProps { height?: number | string; /** Set read-only mode. Default: false */ readOnly?: boolean; + /** Properties that should be added to the outer div container. */ + outerDivAttributes?: Omit, "id" | "data-test-id">; } // Meta data regarding a request @@ -202,8 +204,9 @@ const AutoSuggestion = ({ mode, multiline = false, reInitOnInitialValueChange = false, - height, - readOnly + height, + readOnly, + outerDivAttributes }: AutoSuggestionProps) => { const value = React.useRef(initialValue); const cursorPosition = React.useRef(0); @@ -681,6 +684,7 @@ const AutoSuggestion = ({ id={id} ref={autoSuggestionDivRef} className={`${eccgui}-autosuggestion` + (className ? ` ${className}` : "")} + {...outerDivAttributes} >