@tedi-design-system/angular 6.5.0-rc.7 → 6.5.0-rc.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.
@@ -9242,16 +9242,20 @@ function readInitialState(options, fallback) {
9242
9242
  function createTablePersistence(options) {
9243
9243
  let persist = options.persist;
9244
9244
  let onStateChange = options.onStateChange;
9245
- const internal = signal(readInitialState(persist, options.defaultState ?? {}));
9245
+ // `undefined` until the first patch; until then the resolved state falls
9246
+ // back to storage / defaultState, re-resolved lazily so late-arriving
9247
+ // input values are picked up.
9248
+ const internal = signal(undefined);
9246
9249
  const controlledSignal = signal(options.controlled);
9250
+ const initialInternal = () => readInitialState(persist, options.defaultState?.() ?? {});
9247
9251
  const state = computed(() => ({
9248
- ...internal(),
9252
+ ...(internal() ?? initialInternal()),
9249
9253
  ...(controlledSignal() ?? {}),
9250
9254
  }));
9251
9255
  return {
9252
9256
  state,
9253
9257
  patch(patchOrFn) {
9254
- const previousInternal = internal();
9258
+ const previousInternal = internal() ?? initialInternal();
9255
9259
  const currentControlled = controlledSignal() ?? {};
9256
9260
  const mergedPrev = {
9257
9261
  ...previousInternal,
@@ -9295,7 +9299,7 @@ function createTablePersistence(options) {
9295
9299
  // source so we don't bleed state across tables / persistence keys.
9296
9300
  const sourceChanged = previous?.key !== next?.key || previous?.storage !== next?.storage;
9297
9301
  if (sourceChanged) {
9298
- internal.set(readInitialState(next, options.defaultState ?? {}));
9302
+ internal.set(readInitialState(next, options.defaultState?.() ?? {}));
9299
9303
  }
9300
9304
  },
9301
9305
  setOnStateChange(cb) {
@@ -9865,7 +9869,10 @@ class TediTableComponent {
9865
9869
  // Keep expanded sub-rows on their parent's page instead of counting
9866
9870
  // them against pageSize — otherwise expanding a row pushes root rows
9867
9871
  // off the page (they appear hidden). TanStack defaults this to true.
9868
- paginateExpandedRows: false,
9872
+ // Only set false when the client-side pagination row model runs:
9873
+ // with `false`, sub-row flattening happens exclusively inside
9874
+ // getPaginationRowModel, so without it expansion would never render.
9875
+ paginateExpandedRows: !(paginationEnabled && !manualPagination),
9869
9876
  };
9870
9877
  });
9871
9878
  contextValue;
@@ -10012,7 +10019,7 @@ class TediTableComponent {
10012
10019
  this.persistence = createTablePersistence({
10013
10020
  persist: this.persist(),
10014
10021
  controlled: this.state(),
10015
- defaultState: this.defaultState(),
10022
+ defaultState: () => this.defaultState(),
10016
10023
  onStateChange: (next) => this.stateChange.emit(next),
10017
10024
  });
10018
10025
  this.tableState = this.persistence.state;