@starasia/admin 14.28.0 → 14.30.0

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.
@@ -49,6 +49,31 @@ export interface PageLayoutProps extends PropsWithChildren {
49
49
  * (e.g. tab switches) or when the slide-in fights another transition.
50
50
  */
51
51
  disableAnimation?: boolean;
52
+ /**
53
+ * Remount SELURUH isi PageLayout setiap `location.pathname` berubah.
54
+ * Default `false`.
55
+ *
56
+ * Sampai `@starasia/admin@14.29.0` perilaku ini selalu aktif lewat
57
+ * `key={location.pathname}` di root — niatnya memicu ulang animasi masuk.
58
+ * Untuk navigasi halaman→halaman itu sebenarnya mubazir: route yang berbeda
59
+ * merender komponen yang berbeda, jadi React sudah remount sendiri dan
60
+ * animasinya tetap jalan. Yang benar-benar terdampak justru kasus di mana
61
+ * komponennya TETAP ter-mount dan hanya pathname-nya berubah:
62
+ *
63
+ * - **Layout route + `<Outlet />`** — `Tabs` di layout ikut remount tiap
64
+ * pindah tab, sehingga indikatornya selalu beranimasi dari kiri alih-alih
65
+ * bergeser dari tab sebelumnya. State lain (scroll, input, dropdown
66
+ * terbuka) juga hilang. Ini bug-nya, dan sekarang tidak terjadi lagi.
67
+ * - **Route berparam** (`/users/1` → `/users/2`) — di sini remount kadang
68
+ * memang diinginkan. Nyalakan prop ini kalau halamanmu punya navigasi
69
+ * antar-record (prev/next, klik relasi) DAN mengandalkan state-nya
70
+ * ter-reset.
71
+ *
72
+ * ⚠️ Pertimbangkan `<Detail key={id} />` pada komponen yang benar-benar
73
+ * memiliki state tersebut — lebih tepat sasaran daripada me-remount seluruh
74
+ * PageLayout, yang ikut membuang header, breadcrumb, dan posisi scroll.
75
+ */
76
+ remountOnRouteChange?: boolean;
52
77
  /**
53
78
  * Make PageLayout its own vertical scroll container: it fills the parent's
54
79
  * height (`height: 100%`) and scrolls its content with `overflow: auto`.
@@ -88,5 +113,5 @@ export interface PageLayoutProps extends PropsWithChildren {
88
113
  containerProps?: Omit<BoxProps, "variant" | "gap">;
89
114
  headerProps?: Omit<BoxProps, "gap">;
90
115
  }
91
- export declare const PageLayout: React.MemoExoticComponent<({ backButton, title, titleIcon, titleTag, children, header, headerBorder, disableAnimation, scrollable, stickyHeader, subHeaders, action, titleTagProps, containerProps, headerProps, }: PageLayoutProps) => React.JSX.Element>;
116
+ export declare const PageLayout: React.MemoExoticComponent<(props: PageLayoutProps) => React.JSX.Element>;
92
117
  export {};