{"type":"component","meta":{"docsUrl":"https://v2.quasar.dev/vue-components/popup-edit"},"props":{"model-value":{"desc":"Model of the component; Either use this property (along with a listener for 'update:model-value' event) OR use v-model directive","required":true,"syncable":true,"category":"model","type":"Any","examples":["# v-model=\"myValue\""]},"title":{"type":"String","desc":"Optional title (unless 'title' slot is used)","examples":["'Calories'"],"category":"content"},"buttons":{"type":"Boolean","desc":"Show Set and Cancel buttons","category":"content"},"label-set":{"type":"String","desc":"Override Set button label","examples":["'OK'"],"category":"content"},"label-cancel":{"type":"String","desc":"Override Cancel button label","examples":["'Cancel'"],"category":"content"},"auto-save":{"type":"Boolean","desc":"Automatically save the model (if changed) when user clicks/taps outside of the popup; It does not apply to ESC key","category":"behavior"},"color":{"type":"String","tsType":"NamedColor","desc":"Color name for component from the Quasar Color Palette","examples":["'primary'","'teal'","'teal-10'"],"category":"style","default":"'primary'","required":false},"validate":{"type":"Function","desc":"Validates model then triggers 'save' and closes Popup; Returns a Boolean ('true' means valid, 'false' means abort); Syntax: validate(value); For best performance, reference it from your scope and do not define it inline","params":{"value":{"type":"Any","desc":"Model to validate","examples":["'My car'"]}},"returns":{"type":"Boolean","desc":"Is the model valid or not?"},"default":"() => true","examples":["value => value !== 0"],"category":"model","required":false},"disable":{"type":"Boolean","desc":"Put component in disabled mode","category":"state"},"hover":{"type":"Boolean","desc":"Also opens the menu when the pointer hovers its target and closes it when the pointer leaves both the target and the menu; Click/tap and keyboard interactions keep toggling as usual (touch devices fall back to them), so activating the target closes a hover-shown menu, unless it is still animating into view (which keeps a single move-and-click gesture from closing what it just opened); A hover-opened menu does not switch focus on itself and ignores 'touch-position'; Mutually exclusive with 'context-menu', which takes precedence","category":"behavior","addedIn":"v2.26","passthrough":true},"hover-delay":{"type":"Number","desc":"Delay (in milliseconds) between the pointer entering the target and the menu showing up; Requires the 'hover' prop","default":"0","category":"behavior","addedIn":"v2.26","required":false,"passthrough":true},"hover-hide-delay":{"type":"Number","desc":"Grace period (in milliseconds) in which the pointer can re-enter the target or the menu before it gets closed; Requires the 'hover' prop","default":"150","category":"behavior","addedIn":"v2.26","required":false,"passthrough":true},"transition-show":{"type":"String","desc":"One of Quasar's embedded transitions","examples":["'fade'","'slide-down'"],"category":"transition","default":"'fade'","required":false,"passthrough":true},"transition-hide":{"type":"String","desc":"One of Quasar's embedded transitions","examples":["'fade'","'slide-down'"],"category":"transition","default":"'fade'","required":false,"passthrough":true},"transition-duration":{"type":["String","Number"],"desc":"Transition duration (in milliseconds, without unit)","default":"300","category":"transition","required":false,"passthrough":true},"target":{"type":["Boolean","String","Element"],"desc":"Configure a target element to trigger component toggle; 'true' means it enables the parent DOM element, 'false' means it disables attaching events to any DOM elements; By using a String (CSS selector) or a DOM element it attaches the events to the specified DOM element (if it exists)","default":"true","examples":["false",".my-parent","#target-id","$refs.target"],"category":"behavior","required":false,"passthrough":true},"no-parent-event":{"type":"Boolean","desc":"Skips attaching events to the target DOM element (that trigger the element to get shown)","category":"behavior","passthrough":true},"context-menu":{"type":"Boolean","desc":"Allows the component to behave like a context menu, which opens with a right mouse click (or a long press on touch-capable devices)","category":"behavior","passthrough":true},"dark":{"type":["Boolean","null"],"default":"null","desc":"Notify the component that the background is a dark color","category":"style","required":false,"passthrough":true},"fit":{"type":"Boolean","desc":"Allows the menu to match at least the full width of its target","category":"position","passthrough":true},"cover":{"type":"Boolean","desc":"Allows the menu to cover its target. When used, the 'self' and 'fit' props are no longer effective","category":"position","default":"true","required":false},"anchor":{"type":"String","desc":"Two values setting the starting position or anchor point of the menu relative to its target","values":["'top left'","'top middle'","'top right'","'top start'","'top end'","'center left'","'center middle'","'center right'","'center start'","'center end'","'bottom left'","'bottom middle'","'bottom right'","'bottom start'","'bottom end'"],"category":"position","passthrough":true},"self":{"type":"String","desc":"Two values setting the menu's own position relative to its target","values":["'top left'","'top middle'","'top right'","'top start'","'top end'","'center left'","'center middle'","'center right'","'center start'","'center end'","'bottom left'","'bottom middle'","'bottom right'","'bottom start'","'bottom end'"],"category":"position","passthrough":true},"offset":{"type":"Array","desc":"An array of two numbers (in pixels) which expands the anchor element's bounding box outward horizontally and vertically; the menu is then positioned against the expanded box, so the visible effect depends on the 'anchor'/'self' points in use","examples":["[8, 8]","[5, 10]"],"category":"position","passthrough":true},"touch-position":{"type":"Boolean","desc":"Allows for the target position to be set by the mouse position, when the target of the menu is either clicked or touched","category":"behavior","passthrough":true},"persistent":{"type":"Boolean","desc":"Allows the menu to not be dismissed by a click/tap outside of the menu or by hitting the ESC key; Also, an app route change won't dismiss it","category":"behavior","passthrough":true},"no-esc-dismiss":{"type":"Boolean","desc":"User cannot dismiss the popup by hitting ESC key; No need to set it if 'persistent' prop is also set","category":"behavior","addedIn":"v2.18","passthrough":true},"no-route-dismiss":{"type":"Boolean","desc":"Changing route app won't dismiss the popup; No need to set it if 'persistent' prop is also set","category":"behavior","passthrough":true},"auto-close":{"type":"Boolean","desc":"Allows any click/tap in the menu to close it; Useful instead of attaching events to each menu item that should close the menu on click/tap","category":"behavior","passthrough":true},"separate-close-popup":{"type":"Boolean","desc":"Separate from parent menu, marking it as a separate closing point for v-close-popup (without this, chained menus close all together)","category":"behavior","passthrough":true},"square":{"type":"Boolean","desc":"Forces content to have squared borders","category":"style","passthrough":true},"no-refocus":{"type":"Boolean","desc":"(Accessibility) When Menu gets hidden, do not refocus on the DOM element that previously had focus","category":"behavior","passthrough":true},"no-focus":{"type":"Boolean","desc":"(Accessibility) When Menu gets shown, do not switch focus on it","category":"behavior","passthrough":true},"max-height":{"type":["String","null"],"desc":"The maximum height of the menu; Size in CSS units, including unit name","examples":["'16px'","'2rem'"],"category":"style","default":"null","required":false,"passthrough":true},"max-width":{"type":["String","null"],"desc":"The maximum width of the menu; Size in CSS units, including unit name","examples":["'16px'","'2rem'"],"category":"style","default":"null","required":false,"passthrough":true}},"slots":{"default":{"desc":"Used for injecting the form component; Do NOT destructure it","scope":{"initialValue":{"type":"Any","desc":"Initial value","examples":["0.241","'Text'"]},"value":{"type":"Any","desc":"Current value","examples":["0.241","'Text'"]},"validate":{"type":"Function","desc":"Function that checks if the value is valid","params":{"value":{"type":"Any","required":true,"desc":"Value to be checked","examples":["0","'Changed text'"]}},"returns":{"type":"Boolean","desc":"Checked value is valid or not"}},"set":{"type":"Function","desc":"Function that sets the value and closes the popup","params":null,"returns":null},"cancel":{"type":"Function","desc":"Function that cancels the editing and reverts the value to the initialValue","params":null,"returns":null},"updatePosition":{"type":"Function","desc":"There are some custom scenarios for which Quasar cannot automatically reposition the component without significant performance drawbacks so the optimal solution is for you to call this method when you need it","params":null,"returns":null}}}},"events":{"update:model-value":{"desc":"Emitted when Popup gets cancelled in order to reset model to its initial value; Is also used by v-model","params":{"value":{"type":"Any","desc":"New model value","required":true}}},"before-show":{"desc":"Emitted right before Popup gets shown"},"show":{"desc":"Emitted right after Popup gets shown"},"before-hide":{"desc":"Emitted right before Popup gets dismissed"},"hide":{"desc":"Emitted right after Popup gets dismissed"},"save":{"desc":"Emitted when value has been successfully validated and it should be saved","params":{"value":{"type":"Any","desc":"Validated value to be saved"},"initialValue":{"type":"Any","desc":"Initial value, before changes"}}},"cancel":{"desc":"Emitted when user cancelled the change (hit ESC key or clicking outside of Popup or hit 'Cancel' button)","params":{"value":{"type":"Any","desc":"Edited value"},"initialValue":{"type":"Any","desc":"Initial value, before changes"}}},"escape-key":{"desc":"Emitted when ESC key is pressed; Does not get emitted if Menu is 'persistent' or it has 'no-esc-dismiss' set","passthrough":true}},"methods":{"set":{"desc":"Trigger a model update; Validates model (and emits 'save' event if it's the case) then closes Popup","params":null,"returns":null},"cancel":{"desc":"Triggers a model reset to its initial value ('cancel' event is emitted) then closes Popup","params":null,"returns":null},"show":{"desc":"Triggers component to show","params":{"evt":{"type":"Event","desc":"JS event object","required":false}},"returns":null},"hide":{"desc":"Triggers component to hide","params":{"evt":{"type":"Event","desc":"JS event object","required":false}},"returns":null},"updatePosition":{"desc":"There are some custom scenarios for which Quasar cannot automatically reposition the component without significant performance drawbacks so the optimal solution is for you to call this method when you need it","params":null,"returns":null}}}