Ytils Yupput configuration options

Version 0.12

Configuration options

Config key Type Default Description
.callbackOnChange function N/A Optional: Optional function callback that will be fired on input change. The current input value will be passed in as parameter.
.callbackOnNoSelOnEnter boolean false Whether to fire @callback inputCallback on enter when nothing have been selected. Will use first displayed item or null.
.callbackThumbnailClick function N/A Optional: Callback for clicks on a YupputItem thumbnail. If callback is configured, this callback won't trigger the main click on a YupputItem. Passed in parameters are the value of the active YupputItem and the thumbnail value.
.containsForHeadlineMatches boolean false Whether to use contains logic for headline matching instead of a starts with-check.
.containsForMetaMatches boolean false Whether to use contains logic for meta data matching instead of a starts with-check.
.ctrlShiftChar string "Y" The char that opens the Yupput dialogue, when hit together with CTRL and Shift. If set to null, the short cut will be disabled.
.hideOnCallbackFired boolean false Whether to hide Yupput dialogue on callback fired or not.
.hideOnEscape boolean true Whether to hide Yupput dialogue on escape or not.
.matchCaseInsensitive boolean true Whether to match the user's input case insensitive or not.
.matchOnlyHeadline boolean false Whether to find matches only over the headline value and not within meta data.
.maxItemCount number 4 The maximum number of items being displayed on the Yupput dialogue.
.moveCursorToEndOnUp boolean true Whether to force the cursor to stay at the end of the input element when pressing up. This prevents the browser's default behaviour.
.placeholder string "Search value" Value for the Placeholder of the search text input.
.preloadImages boolean false Whether to preload the images of the items passed into the constructor or not.
.stopPropagateDblClick boolean false Whether to stop propagation of double clicking the input field to close Yupput input without selection. This functionality is for mobile browsers that do not have an ESC key.
.stopPropagateEnter boolean false Whether to stop propagation of enter when hit while the cursor is in Yupput's input field.
.stopPropagateEscape boolean false Whether to stop propagation of escape when hit while the cursor is in Yupput's input field.
.zIndex number 2000 The CSS z-index for the Yupput container.