Props

io.github.nafg.scalajs.facades.mui.Autocomplete.Props
class Props extends PropTypes

Attributes

Graph
Supertypes
trait PropTypes
class Object
trait Matchable
class Any

Members list

Type members

Classlikes

object blurOnSelect extends Prop[String | Boolean]

Control if the input should be blurred when an option is selected:

Control if the input should be blurred when an option is selected:

  • false the input is not blurred.
  • true the input is always blurred.
  • touch the input is blurred after a touch event.
  • mouse the input is blurred after a mouse event.

Attributes

Supertypes
class Prop[String | Boolean]
class Object
trait Matchable
class Any
Self type
object forcePopupIcon extends Prop[String | Boolean]

Force the visibility display of the popup icon.

Force the visibility display of the popup icon.

Attributes

Supertypes
class Prop[String | Boolean]
class Object
trait Matchable
class Any
Self type
object size extends Prop[String]

The size of the component.

The size of the component.

Attributes

Supertypes
class Prop[String]
class Object
trait Matchable
class Any
Self type
size.type

Inherited classlikes

object dyn extends Dynamic

Attributes

Inherited from:
PropTypes
Supertypes
trait Dynamic
class Object
trait Matchable
class Any

Value members

Concrete methods

def ChipProps: Prop[Object]

Props applied to the Chip element.

Props applied to the Chip element.

Attributes

def ListboxComponent: Prop[ElementType]

The component used to render the listbox.

The component used to render the listbox.

Attributes

def ListboxProps: Prop[Object]

Props applied to the Listbox element.

Props applied to the Listbox element.

Attributes

def PaperComponent: Prop[ElementType]

The component used to render the body of the popup.

The component used to render the body of the popup.

Attributes

def PopperComponent: Prop[ElementType]

The component used to position the popup.

The component used to position the popup.

Attributes

def autoComplete: Prop[Boolean]

If true, the portion of the selected suggestion that has not been typed by the user, known as the completion string, appears inline after the input cursor in the textbox. The inline completion string is visually highlighted and has a selected state.

If true, the portion of the selected suggestion that has not been typed by the user, known as the completion string, appears inline after the input cursor in the textbox. The inline completion string is visually highlighted and has a selected state.

Attributes

def autoHighlight: Prop[Boolean]

If true, the first option is automatically highlighted.

If true, the first option is automatically highlighted.

Attributes

def autoSelect: Prop[Boolean]

If true, the selected option becomes the value of the input when the Autocomplete loses focus unless the user chooses a different option or changes the character string in the input.

If true, the selected option becomes the value of the input when the Autocomplete loses focus unless the user chooses a different option or changes the character string in the input.

When using freeSolo mode, the typed value will be the input value if the Autocomplete loses focus without highlighting an option.

Attributes

def classes: Prop[Object]

Override or extend the styles applied to the component.

Override or extend the styles applied to the component.

Attributes

def clearIcon: Prop[VdomNode]

The icon to display in place of the default clear icon.

The icon to display in place of the default clear icon.

Attributes

def clearOnBlur: Prop[Boolean]

If true, the input's text is cleared on blur if no value is selected.

If true, the input's text is cleared on blur if no value is selected.

Set to true if you want to help the user enter a new value. Set to false if you want to help the user resume their search.

Attributes

def clearOnEscape: Prop[Boolean]

If true, clear all values when the user presses escape and the popup is closed.

If true, clear all values when the user presses escape and the popup is closed.

Attributes

def clearText: Prop[String]

Override the default text for the clear icon button.

Override the default text for the clear icon button.

For localization purposes, you can use the provided translations.

Attributes

def closeText: Prop[String]

Override the default text for the close popup icon button.

Override the default text for the close popup icon button.

For localization purposes, you can use the provided translations.

Attributes

def componentsProps: Prop[Object]

The props used for each slot inside.

The props used for each slot inside.

Attributes

def defaultValue: Prop[Any]

The default value. Use when the component is not controlled.

The default value. Use when the component is not controlled.

Attributes

def disableClearable: Prop[Boolean]

If true, the input can't be cleared.

If true, the input can't be cleared.

Attributes

def disableCloseOnSelect: Prop[Boolean]

If true, the popup won't close when a value is selected.

If true, the popup won't close when a value is selected.

Attributes

def disableListWrap: Prop[Boolean]

If true, the list box in the popup will not wrap focus.

If true, the list box in the popup will not wrap focus.

Attributes

def disablePortal: Prop[Boolean]

If true, the Popper content will be under the DOM hierarchy of the parent component.

If true, the Popper content will be under the DOM hierarchy of the parent component.

Attributes

def disabled: Prop[Boolean]

If true, the component is disabled.

If true, the component is disabled.

Attributes

def disabledItemsFocusable: Prop[Boolean]

If true, will allow focus on disabled items.

If true, will allow focus on disabled items.

Attributes

def filterOptions: Prop[(Seq[Any], Object) => Seq[Any]]

A function that determines the filtered options to be rendered on search.

A function that determines the filtered options to be rendered on search.

Value parameters

{Value[]}

options The options to render.

{object}

state The state of the component.

Attributes

def filterSelectedOptions: Prop[Boolean]

If true, hide the selected options from the list box.

If true, hide the selected options from the list box.

Attributes

def freeSolo: Prop[Boolean]

If true, the Autocomplete is free solo, meaning that the user input is not bound to provided options.

If true, the Autocomplete is free solo, meaning that the user input is not bound to provided options.

Attributes

def fullWidth: Prop[Boolean]

If true, the input will take up the full width of its container.

If true, the input will take up the full width of its container.

Attributes

def getLimitTagsText: Prop[Any => Any]

The label to display when the tags are truncated (limitTags).

The label to display when the tags are truncated (limitTags).

Value parameters

{number}

more The number of truncated tags.

Attributes

def getOptionDisabled: Prop[Any => Any]

Used to determine the disabled state for a given option.

Used to determine the disabled state for a given option.

Value parameters

{Value}

option The option to test.

Attributes

def getOptionKey: Prop[Any => Any]

Used to determine the key for a given option. This can be useful when the labels of options are not unique (since labels are used as keys by default).

Used to determine the key for a given option. This can be useful when the labels of options are not unique (since labels are used as keys by default).

Value parameters

{Value}

option The option to get the key for.

Attributes

def getOptionLabel: Prop[Any => String]

Used to determine the string value for a given option. It's used to fill the input (and the list box options if renderOption is not provided).

Used to determine the string value for a given option. It's used to fill the input (and the list box options if renderOption is not provided).

If used in free solo mode, it must accept both the type of the options and a string.

Value parameters

{Value}

option

Attributes

def groupBy: Prop[Any => Any]

If provided, the options will be grouped under the returned string. The groupBy value is also used as the text for group headings when renderGroup is not provided.

If provided, the options will be grouped under the returned string. The groupBy value is also used as the text for group headings when renderGroup is not provided.

Value parameters

{Value}

options The options to group.

Attributes

def handleHomeEndKeys: Prop[Boolean]

If true, the component handles the "Home" and "End" keys when the popup is open. It should move focus to the first option and last option, respectively.

If true, the component handles the "Home" and "End" keys when the popup is open. It should move focus to the first option and last option, respectively.

Attributes

def id: Prop[String]

This prop is used to help implement the accessibility logic. If you don't provide an id it will fall back to a randomly generated one.

This prop is used to help implement the accessibility logic. If you don't provide an id it will fall back to a randomly generated one.

Attributes

def includeInputInList: Prop[Boolean]

If true, the highlight can move to the input.

If true, the highlight can move to the input.

Attributes

def inputValue: Prop[String]

The input value.

The input value.

Attributes

def isOptionEqualToValue: Prop[(Any, Any) => Boolean]

Used to determine if the option represents the given value. Uses strict equality by default. ⚠️ Both arguments need to be handled, an option can only match with one value.

Used to determine if the option represents the given value. Uses strict equality by default. ⚠️ Both arguments need to be handled, an option can only match with one value.

Value parameters

{Value}

value The value to test against.

Attributes

def limitTags: Prop[Any]

The maximum number of tags that will be visible when not focused. Set -1 to disable the limit.

The maximum number of tags that will be visible when not focused. Set -1 to disable the limit.

Attributes

def loading: Prop[Boolean]

If true, the component is in a loading state. This shows the loadingText in place of suggestions (only if there are no suggestions to show, e.g. options are empty).

If true, the component is in a loading state. This shows the loadingText in place of suggestions (only if there are no suggestions to show, e.g. options are empty).

Attributes

def loadingText: Prop[VdomNode]

Text to display when in a loading state.

Text to display when in a loading state.

For localization purposes, you can use the provided translations.

Attributes

def multiple: Prop[Boolean]

If true, value must be an array and the menu will support multiple selections.

If true, value must be an array and the menu will support multiple selections.

Attributes

def noOptionsText: Prop[VdomNode]

Text to display when there are no options.

Text to display when there are no options.

For localization purposes, you can use the provided translations.

Attributes

def onChange: Prop[(ReactEvent, Any) => Callback]

Callback fired when the value changes.

Callback fired when the value changes.

Value parameters

{React.SyntheticEvent}

event The event source of the callback.

{Value|Value[]}

value The new value of the component.

{string}

[details]

Attributes

def onClick: Prop[ReactMouseEventFromHtml => Callback]
def onClose: Prop[Any => Any]

Callback fired when the popup requests to be closed. Use in controlled mode (see open).

Callback fired when the popup requests to be closed. Use in controlled mode (see open).

Value parameters

{React.SyntheticEvent}

event The event source of the callback.

{string}

reason Can be: "toggleInput", "escape", "selectOption", "removeOption", "blur".

Attributes

def onHighlightChange: Prop[Any => Any]

Callback fired when the highlight option changes.

Callback fired when the highlight option changes.

Value parameters

{React.SyntheticEvent}

event The event source of the callback.

{Value}

option The highlighted option.

{string}

reason Can be: "keyboard", "auto", "mouse", "touch".

Attributes

def onInputChange: Prop[(ReactEvent, String, String) => Callback]

Callback fired when the input value changes.

Callback fired when the input value changes.

Value parameters

{React.SyntheticEvent}

event The event source of the callback.

{string}

reason Can be: "input" (user input), "reset" (programmatic change), "clear".

Attributes

def onOpen: Prop[Any => Any]

Callback fired when the popup requests to be opened. Use in controlled mode (see open).

Callback fired when the popup requests to be opened. Use in controlled mode (see open).

Value parameters

{React.SyntheticEvent}

event The event source of the callback.

Attributes

def open: Prop[Boolean]

If true, the component is shown.

If true, the component is shown.

Attributes

def openOnFocus: Prop[Boolean]

If true, the popup will open on input focus.

If true, the popup will open on input focus.

Attributes

def openText: Prop[String]

Override the default text for the open popup icon button.

Override the default text for the open popup icon button.

For localization purposes, you can use the provided translations.

Attributes

def options: Prop[Seq[Any]]

Array of options.

Array of options.

Attributes

def popupIcon: Prop[VdomNode]

The icon to display in place of the default popup icon.

The icon to display in place of the default popup icon.

Attributes

def readOnly: Prop[Boolean]

If true, the component becomes readonly. It is also supported for multiple tags where the tag cannot be deleted.

If true, the component becomes readonly. It is also supported for multiple tags where the tag cannot be deleted.

Attributes

def renderGroup: Prop[Any => Any]

Render the group.

Render the group.

Value parameters

{AutocompleteRenderGroupParams}

params The group to render.

Attributes

def renderInput: Prop[Dictionary[Any] => VdomNode]

Render the input.

Render the input.

Value parameters

{object}

params

Attributes

def renderOption: Prop[(Object, Any, Object, Object) => VdomNode]

Render the option, use getOptionLabel by default.

Render the option, use getOptionLabel by default.

Value parameters

{Value}

option The option to render.

{object}

ownerState The state of the Autocomplete component.

Attributes

def renderTags: Prop[Any => Any]

Render the selected value.

Render the selected value.

Value parameters

{Value[]}

value The value provided to the component.

{function}

getTagProps A tag props getter.

{object}

ownerState The state of the Autocomplete component.

Attributes

def selectOnFocus: Prop[Boolean]

If true, the input's text is selected on focus. It helps the user clear the selected value.

If true, the input's text is selected on focus. It helps the user clear the selected value.

Attributes

def slotProps: Prop[Object]

The props used for each slot inside.

The props used for each slot inside.

Attributes

def style: Prop[Object]
def sx: Prop[Seq[Any => Any | Object | Boolean] | Any => Any | Object]

The system prop that allows defining system overrides as well as additional CSS styles.

The system prop that allows defining system overrides as well as additional CSS styles.

Attributes

def value: Prop[Any]

The value of the autocomplete.

The value of the autocomplete.

The value must have reference equality with the option in order to be selected. You can customize the equality behavior with the isOptionEqualToValue prop.

Attributes

Inherited methods

def of[A : Writer](implicit evidence$1: Writer[A], name: Name): Prop[A]

Attributes

Inherited from:
PropTypes

Inherited fields

val key: Prop[Key]

Attributes

Inherited from:
PropTypes