Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/table/src/lib/Table.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@

ConfigContext.initialize();
CustomCellsContext.initialize();
CustomHeadersContext.initialize();
StyleContext.initialize();
Context.initialize();
const controller = Context.controller;
Expand Down
1 change: 0 additions & 1 deletion packages/table/src/lib/context/context.svelte.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ const VERTICAL_SCROLLBAR_CONTROLLER_KEY = Symbol("vertical-scrollbar-controller"
const HORIZONTAL_SCROLLBAR_CONTROLLER_KEY = Symbol("horizontal-scrollbar-controller");
const TABLE_PORTAL_CONTROLLER_KEY = Symbol("table-portal-controller");
const OVERSCROLL_MODIFIER_KEY = Symbol("overscroll-modifier");
const CONFIG_KEY = Symbol("config");

export class Context {
public static initialize() {
Expand Down
2 changes: 1 addition & 1 deletion packages/table/src/lib/context/coordinator.svelte.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import { coordinator, type Coordinator } from "@uwdata/mosaic-core";
import { getContext, setContext } from "svelte";

const COORDINATOR_KEY = "mosaic-coordinator";
const COORDINATOR_KEY = Symbol("mosaic-coordinator");

export class CoordinatorContext {
public static get coordinator(): Coordinator {
Expand Down
2 changes: 1 addition & 1 deletion packages/table/src/lib/context/custom-cells.svelte.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export class CustomCellsState {
config: CustomCellsConfig = $state({});
}

const CUSTOM_CELLS_KEY = "custom-cells";
const CUSTOM_CELLS_KEY = Symbol("custom-cells");

export class CustomCellsContext {
public static initialize() {
Expand Down
2 changes: 1 addition & 1 deletion packages/table/src/lib/context/custom-headers.svelte.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export class CustomHeadersState {
config: AdditionalHeaderContentsConfig = $state({});
}

const CUSTOM_HEADERS_KEY = "custom-cells";
const CUSTOM_HEADERS_KEY = Symbol("custom-headers");

export class CustomHeadersContext {
public static initialize() {
Expand Down
2 changes: 1 addition & 1 deletion packages/table/src/lib/views/cells/CellContent.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
const controller = Context.controller;
const schema = Context.schema;
const config = ConfigContext.config;
const customCellsConfig = CustomCellsContext.config;
let customCellsConfig = $derived(CustomCellsContext.config);

let height: number = $state(0);
let contentHeight = $state(0);
Expand Down
2 changes: 1 addition & 1 deletion packages/table/src/lib/views/headers/Header.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
const model = Context.model;
const schema = Context.schema;
const config = ConfigContext.config;
const customHeadersConfig = CustomHeadersContext.config;
let customHeadersConfig = $derived(CustomHeadersContext.config);

let element: HTMLElement | null = $state(null);
let contentWidth: number = $state(0);
Expand Down