diff --git a/examples/reference/widgets/AutocompleteInput.ipynb b/examples/reference/widgets/AutocompleteInput.ipynb index 82b5094284..60d5d6cf44 100644 --- a/examples/reference/widgets/AutocompleteInput.ipynb +++ b/examples/reference/widgets/AutocompleteInput.ipynb @@ -26,6 +26,7 @@ "\n", "* **``options``** (list or dict): A list or dictionary of options to select from\n", "* **``value``** (object): The current value; must be one of the option values\n", + "* **``restrict``** (boolean): Set to False in order to allow users to enter text that is not present in the options list.\n", "\n", "##### Display\n", "\n", @@ -93,4 +94,4 @@ }, "nbformat": 4, "nbformat_minor": 4 -} +} \ No newline at end of file diff --git a/panel/package-lock.json b/panel/package-lock.json index 04f5ad9e29..18aea7f93c 100644 --- a/panel/package-lock.json +++ b/panel/package-lock.json @@ -1,6 +1,6 @@ { "name": "@holoviz/panel", - "version": "0.10.0-a24", + "version": "0.10.0-a25", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/panel/widgets/select.py b/panel/widgets/select.py index 3d0b05f1e8..d5095fdb2d 100644 --- a/panel/widgets/select.py +++ b/panel/widgets/select.py @@ -19,7 +19,7 @@ from ..layout import Column, VSpacer from ..models import SingleSelect as _BkSingleSelect -from ..util import as_unicode, isIn, indexOf +from ..util import as_unicode, isIn, indexOf, bokeh_version from .base import Widget, CompositeWidget from .button import _ButtonBase, Button from .input import TextInput, TextAreaInput @@ -205,6 +205,11 @@ class MultiChoice(_MultiSelectBase): _widget_type = _BkMultiChoice +_AutocompleteInput_rename = {'name': 'title', 'options': 'completions'} +if bokeh_version < '2.3.0': + # disable restrict keyword + _AutocompleteInput_rename['restrict'] = None + class AutocompleteInput(Widget): min_characters = param.Integer(default=2, doc=""" @@ -219,9 +224,11 @@ class AutocompleteInput(Widget): case_sensitive = param.Boolean(default=True) + restrict = param.Boolean(default=True) + _widget_type = _BkAutocompleteInput - _rename = {'name': 'title', 'options': 'completions'} + _rename = _AutocompleteInput_rename class _RadioGroupBase(SingleSelectBase):