Skip to content

allowed to enable/disable autocompletion #51

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions streamlit_ace/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ def st_ace(
annotations=None,
markers=None,
auto_update=False,
enable_basic_autocompletion=True,
enable_live_autocompletion=True,
key=None
):
"""Display an Ace editor.
Expand Down Expand Up @@ -118,6 +120,10 @@ def st_ace(
auto_update : bool
Choose whether Streamlit auto updates on input change, or waits
for user validation. False by default.
enable_basic_autocompletion : bool
Enable autocompletion pop-up upon pressing ctrl+space. True by default.
enable_live_autocompletion : bool
Enable automatic autocompletion pop-up. True by default.
key : str
An optional string to use as the unique key for the widget.
If this is omitted, a key will be generated for the widget
Expand Down Expand Up @@ -147,6 +153,8 @@ def st_ace(
annotations=annotations or [],
markers=markers or [],
autoUpdate=auto_update,
enableBasicAutocompletion=enable_basic_autocompletion,
enableLiveAutocompletion=enable_live_autocompletion,
key=key,
default=str(value),
)
2 changes: 0 additions & 2 deletions streamlit_ace/frontend/src/Ace.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,6 @@ const Ace = ({ args, theme }: AceProps) => {


// Set default prop values that shouldn't be exposed to python
args.enableBasicAutocompletion = true
args.enableLiveAutocompletion = true
args.onChange = handleChange
args.width = "100%"

Expand Down