@phis/ui 0.4.18 → 0.4.19
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.
|
@@ -1029,6 +1029,8 @@ export function PhiTableControl({ rows, rowIdentityPath, columns, columnOrder, s
|
|
|
1029
1029
|
"phi-table-control",
|
|
1030
1030
|
hasClosingBlock ? "phi-table-control--closing-block" : null,
|
|
1031
1031
|
stickyHeader && showHeader !== false ? "phi-table-control--sticky-header" : null,
|
|
1032
|
+
// No rows, nothing measured: the sticky header's fixed layout would have no widths to fix.
|
|
1033
|
+
!loading && dataSource.length === 0 ? "phi-table-control--empty" : null,
|
|
1032
1034
|
]
|
|
1033
1035
|
.filter(Boolean)
|
|
1034
1036
|
.join(" "), style: { "--phi-table-striped-row-background": token.colorFillAlter }, rowKey: (row) => loading
|
package/package.json
CHANGED
|
@@ -527,17 +527,37 @@ function usePhiDeveloperBuilderWorkspaceController(options) {
|
|
|
527
527
|
* The Pages workspace derives which Pages are visible from which Modules are active, so an unsaved
|
|
528
528
|
* Module change has to reach it even though the change itself is made and persisted from elsewhere --
|
|
529
529
|
* the URL is what carries it across that gap.
|
|
530
|
+
*
|
|
531
|
+
* It writes last, on top of an address that already names its Area and Page. The address is also
|
|
532
|
+
* written by the effect that settles the Area and Page below, and both built their next address from
|
|
533
|
+
* the same old one, so each dropped what the other had set; and before the Area's Modules had loaded
|
|
534
|
+
* this one wrote an empty list. Every write is a server render of the canvas -- five per open, some of
|
|
535
|
+
* them aborted, one of them a Shell with no Modules -- and when the last one died the canvas stayed
|
|
536
|
+
* "Rendering" with its Regions empty. So it waits for the Modules and for the Area and Page to be in
|
|
537
|
+
* the address, and adds the Modules to that.
|
|
530
538
|
*/
|
|
531
539
|
useEffect(() => {
|
|
532
540
|
if (typeof pathname !== "string" ||
|
|
533
541
|
(builderWorkspaceKey !== "shells" && builderWorkspaceKey !== "pages") ||
|
|
542
|
+
state.runtimeModuleIdsByArea == null ||
|
|
543
|
+
scopeAreaFromSearch == null ||
|
|
544
|
+
scopePageFromSearch == null ||
|
|
534
545
|
searchParams.get(PHI_BUILDER_RUNTIME_MODULES_SEARCH_PARAM) === selectedRuntimeModuleIdsSearchValue) {
|
|
535
546
|
return;
|
|
536
547
|
}
|
|
537
548
|
const nextSearchParams = new URLSearchParams(searchParams.toString());
|
|
538
549
|
nextSearchParams.set(PHI_BUILDER_RUNTIME_MODULES_SEARCH_PARAM, selectedRuntimeModuleIdsSearchValue);
|
|
539
550
|
router.replace(`${pathname}?${nextSearchParams.toString()}`, { scroll: false });
|
|
540
|
-
}, [
|
|
551
|
+
}, [
|
|
552
|
+
builderWorkspaceKey,
|
|
553
|
+
pathname,
|
|
554
|
+
router,
|
|
555
|
+
scopeAreaFromSearch,
|
|
556
|
+
scopePageFromSearch,
|
|
557
|
+
searchParams,
|
|
558
|
+
selectedRuntimeModuleIdsSearchValue,
|
|
559
|
+
state.runtimeModuleIdsByArea,
|
|
560
|
+
]);
|
|
541
561
|
useEffect(() => {
|
|
542
562
|
if (builderWorkspaceKey !== "shells") {
|
|
543
563
|
return;
|
package/styles/controls.css
CHANGED
|
@@ -566,8 +566,13 @@ h5.phi-typography, .phi-typography h5 {
|
|
|
566
566
|
* to its title and a `fill` column took the rest, out of line with the rows under it. Fixed layout makes
|
|
567
567
|
* the `<colgroup>` the header's widths. The body keeps the configured `layout.mode`; Ant Design writes
|
|
568
568
|
* that inline on both tables, so the header's is stated over it.
|
|
569
|
+
*
|
|
570
|
+
* Not while the table is empty. With no rows Ant Design has measured nothing and leaves the header's
|
|
571
|
+
* `<colgroup>` without widths, so fixed layout took them from the header cells instead: every `content`
|
|
572
|
+
* column got its 1% -- a dozen pixels, its title cut to one letter -- and the `fill` column the rest.
|
|
573
|
+
* Without rows there is nothing to line up with, and `auto` gives each title its own width.
|
|
569
574
|
*/
|
|
570
|
-
.phi-table-control.phi-table-control--sticky-header [class~="ant-table-sticky-holder"] > table {
|
|
575
|
+
.phi-table-control.phi-table-control--sticky-header:not(.phi-table-control--empty) [class~="ant-table-sticky-holder"] > table {
|
|
571
576
|
table-layout: fixed !important;
|
|
572
577
|
}
|
|
573
578
|
|