Skip to content

MAutoCompleteStyle

Stanislav Podolia edited this page Jul 21, 2020 · 7 revisions

Flow Wiki

MAutoCompleteStyle

  • MTextInputStyle

  • TextInputType

  • AutoCompleteType

  • Multiline

    • MMaxLines
      Sets height of the box if input is multiline
      Calculates height by the content if lines parameter equals 0 or -1 (affects MTextInput only)
      If lines parameter < -1, calculates height by the content but limits its height to abs(lines parameter) lines (no limits for MEllipsisText)
      For example, with MMaxLines(-4) input height can grow from 1 up to 4 lines
      • lines : int
  • ReadOnly

  • MaxChars

    • MShowMaxChars
      Hides max chars info below the input
      • show : bool
  • PasswordMode

  • WordWrap

  • AutoAlign

    • MFloatingLabel
      Move the label above the input on focus

    • MDynamicSize
      Height of input changes corresponding to the floating label and error visibility.

    • MShowUnderline
      Show or hide line below input (Works with MTextInput and MAutoComplete)

      • show : bool
    • MLeftIcon
      Left icon
      See MShowLeftButton for action button

    • MShowLeftButton
      Show left button. Intended for MAutoComplete.

      • show : bool
    • MLeftCustomButton
      Left button

    • MShowClearIcon
      Show clear icon on focus and/or on hover

      • onFocus : bool
      • onHover : bool
    • MShowDropDownArrow
      Dropdown arrow on the right

      • show : bool
    • MShowEditIcon
      Show edit icon

      • enabled : bool
    • MCustomTextStyle
      Custom size and color, use MCustomFont for custom fontfamilies and opacities.

    • MDynamicTextStyle

    • MLabelTextStyle
      Text style of MLabel

    • MInputFontPadding
      Padding of the font inside input field

      • padding : double
    • MCondensed
      Style for slimmer rows (height = 32 dp)

      • condensed : bool
    • MFilterAction
      Action on enter or selecting of suggested result

      • action : (string) -> void
    • MInputBorders
      Borders of the input box
      textInput/smallEdit : (0., if (hasFloatingLabel) {if (condensed) 20. else 28.} else {if (condensed) 12. else 16.}, 0.,
      if (condensed) 12. else 16.)
      autocomplete : (8., if (hasFloatingLabel) {if (condensed) 20. else 28.} else {if (condensed) 12. else 16.}, 8.,
      if (condensed) 12. else 16.)

      • start : double
      • top : double
      • end : double
      • bottom : double
    • MMaxHeight

      • height : double
    • MEditDialog
      Make input in dialog, added to MSmallEditDialog by default

    • MElevation
      Elevation on focus (8. by default)

    • MInputBackgroundStyle
      Input background, empty for inputs without popups

    • MNativeInput
      Set useNativeInput to false for input field written using forms (true by default)
      Intended only for cpp, in js can't recognize capslock state
      Also you can set "nativeInputs" url parameter to 0

      • useNativeInput : bool
    • MHaveBeenFocused
      Intended for using with MInputError only

      • focused : DynamicBehaviour<bool>
    • MUnderlineUnfocusedStyle
      Style of the disabled underline

      • style : [ GraphicsStyle ]
    • MNumericStep
      Sets step to increase/decrease value into numeric type textinput

    • MIconSize
      Width and height of the icon
      24px by default

      • size : double
    • MIconButtonBorder
      Inner borders of the button
      Half the size of the icon by default

      • border : double
    • MTextInputScrollStyle
      scroll style when text is in preview mode

    • MFloatingLabelStyle

    • MFilled

    • MOutlined

  • MCompletionFn
    Material copy of TCompletionFn
    Use fixed sizes for scroll to work properly

    • fn : (match : SentenceMatch, selected : bool, setWord : (SentenceMatch) -> void) -> Material
  • TCompletionFn

  • MSentenceMatcher
    Custom sentence matching function

    • matcher : (sentences : [ string ]) -> SentenceMatcher
    • fn : (matcher : SentenceMatcher, input : string, maxHits : int, prefix : bool, exhaustive : bool, position : int) -> [ SentenceMatch ]
  • MPreparedSentenceMatcher
    pre-built custom sentence matcher. When it is defined, the 'matcher' function of MSentenceMatcher is not used.

  • MDictionary
    Dictionaries for auto completion
    See dictionaries field comments in MAutoComplete above for more info

    • dictionaries : [ string ]
  • MCurrentMatches
    Dictionary id, sentence id, sentence hit

    • fn : ([ Triple<int, int, SentenceMatch> ]) -> void
  • TMatchedHandler

  • MShowAllOnEmpty
    Shows all the sentences when input is empty
    (MMaxResults win over this, i.e., if it's not set, only first 10 sentences will be shown)

  • MMaxResults
    Amount of suggested results (10 by default). -1 to remove limit

    • results : int
  • MAutoSelect
    Always select one of the possible results

  • MIncludeSpaces
    Include spaces in autocompletition
    False for multiline

    • includeSpaces : bool
  • MSuggestionsBackgroundStyle
    Background of the suggestions dropdown

  • MTextInputOutOfPopup
    Do not put MTextInput into popup.

  • MInputNoLeftBorder
    Set 0. to left border.

  • MSuggestionsPlacement
    Defines suggestions area`s location.
    MTop/MBottom are strict ones.
    MTryTopFirst/MTryBottomFirst will relocate suggestions area in case of limited available space.

  • MSuggestionInLine
    Shows the best suggestion into input area. It may be approved by "enter"

    • showPopup : bool
  • MAutoCompleteStartSearch
    Shows suggestions only if content length >= minChars and wait milliseconds after last key event.
    (0, 0) by default

    • minChars : int
    • wait : int
  • MCustomPopup

  • MAutoCompleteShowMoreButton

Clone this wiki locally