fix: retain pending Toast and Table fidelity corrections
This commit is contained in:
@@ -69,8 +69,15 @@ export default defineComponent({
|
||||
width,
|
||||
setWidth,
|
||||
});
|
||||
const cssWidth = (value: string | number | undefined) =>
|
||||
typeof value === "number" ? `${value}px` : value;
|
||||
const cssWidth = (value: string | number | undefined) => {
|
||||
if (value === undefined) return undefined;
|
||||
if (typeof value === "number") return `${value}px`;
|
||||
// CSS Grid fr units are not valid table widths. Treat Nfr as a flexible
|
||||
// column (native width:auto sharing remaining space). This does not
|
||||
// implement RAC fr weight proportions across columns.
|
||||
if (/^\d+(\.\d+)?fr$/.test(value)) return undefined;
|
||||
return value;
|
||||
};
|
||||
const sortDirection = computed<TableSortDirection | undefined>(() => {
|
||||
if (!props.allowsSorting || !props.id) return undefined;
|
||||
const d = ctx?.sortDescriptor.value;
|
||||
@@ -99,6 +106,10 @@ export default defineComponent({
|
||||
maxWidth: cssWidth(props.maxWidth),
|
||||
},
|
||||
"data-column-id": props.id,
|
||||
"data-default-width":
|
||||
typeof (props.width ?? width.value) === "string"
|
||||
? String(props.width ?? width.value)
|
||||
: undefined,
|
||||
"data-row-header": props.isRowHeader || undefined,
|
||||
"data-slot": "table-column",
|
||||
"data-allows-sorting": props.allowsSorting || undefined,
|
||||
|
||||
Reference in New Issue
Block a user