@featherk/composables 0.13.6 → 0.13.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/docs-manifest.js +24 -24
- package/dist/featherk-composables.es.js +4 -2
- package/dist/featherk-composables.es.js.map +1 -1
- package/dist/featherk-composables.umd.js +1 -1
- package/dist/featherk-composables.umd.js.map +1 -1
- package/dist/window/useWindow.d.ts +2 -0
- package/docs/window/useWindow.md +4 -0
- package/package.json +1 -1
|
@@ -21,6 +21,8 @@ export interface WindowSettings {
|
|
|
21
21
|
minimizeButton: boolean;
|
|
22
22
|
/** Hidden via `windowClass`, not a real Kendo prop - see docs "Inert Props". */
|
|
23
23
|
maximizeButton: boolean;
|
|
24
|
+
initialLeft?: number;
|
|
25
|
+
initialTop?: number;
|
|
24
26
|
initialWidth: number;
|
|
25
27
|
initialHeight: number;
|
|
26
28
|
width?: number;
|
package/docs/window/useWindow.md
CHANGED
|
@@ -43,6 +43,8 @@ Pass `settings` with only the fields you want to change; `useWindow` merges it o
|
|
|
43
43
|
const { windowRef, visible, props, events, open } = useWindow({
|
|
44
44
|
settings: {
|
|
45
45
|
title: "Preferences",
|
|
46
|
+
initialLeft: 120,
|
|
47
|
+
initialTop: 40,
|
|
46
48
|
initialWidth: 600,
|
|
47
49
|
initialHeight: 400,
|
|
48
50
|
resizable: false,
|
|
@@ -63,6 +65,8 @@ A partially-populated ref is fine - any field `myLoadedSettings` doesn't have fa
|
|
|
63
65
|
|
|
64
66
|
`open()` respects this: by default it reopens at whatever `left`/`top`/`width`/`height` are already on `settings` (a prior drag/resize, or a value you restored from persistence), rather than recomputing the initial inset position. Pass `open({ resetPosition: true })` to force the Window back to its computed initial position/size instead - see `UseWindowReturn.open` in the API table below.
|
|
65
67
|
|
|
68
|
+
Set `settings.initialLeft` and/or `settings.initialTop` to override the default 16px right/top inset on the first open and whenever `resetPosition` is true. Each coordinate can be overridden independently; an omitted coordinate keeps its computed inset default.
|
|
69
|
+
|
|
66
70
|
## Extending Window Behavior
|
|
67
71
|
|
|
68
72
|
Use the `UseWindowOptions` callbacks when application code needs to react to Window behavior. These callbacks are extension hooks: they run after `useWindow` completes its internal handling, and they do not replace Kendo's event handlers.
|