Skip to content

Fix angular input + API consistency#161

Open
benjavicente wants to merge 6 commits intoTanStack:mainfrom
benjavicente:fix-angular-input
Open

Fix angular input + API consistency#161
benjavicente wants to merge 6 commits intoTanStack:mainfrom
benjavicente:fix-angular-input

Conversation

@benjavicente
Copy link

@benjavicente benjavicente commented Feb 22, 2026

🎯 Changes

This PR does 2 things, both in injectQueuedValue:

  • value could be called on component initialization, causing injectQueuedValue to throw. I added a tests first to demonstrate the issue and then I added a commit to fix it. There was an example that tested against that error, but where the path where of the value() call wasn't reached (maybeSelector is not undefined).

    protected readonly queued = injectQueuedValue(this.value, null, { wait: 500 }, (state) => ({
    items: state.items,
    }))
    >(
    value: Signal<TValue>,
    initialValueOrOptions?: TValue | QueuerOptions<TValue>,
    initialOptionsOrSelector?:
    | QueuerOptions<TValue>
    | ((state: QueuerState<TValue>) => TSelected),
    maybeSelector?: (state: QueuerState<TValue>) => TSelected,
    ): QueuedSignal<TValue, TSelected> {
    const hasSelector = typeof initialOptionsOrSelector === 'function'
    const hasInitialValue =
    (initialOptionsOrSelector !== undefined && !hasSelector) ||
    maybeSelector !== undefined
    const initialValue = hasInitialValue
    ? (initialValueOrOptions as TValue)
    : value()

  • The injectQueuedValue was returning an array instead of a queued value. I guess that was a mistake, so I aligned the function to behave similar to the React api.

✅ Checklist

  • I have followed the steps in the Contributing guide.
  • I have tested this code locally with pnpm run test:pr.

🚀 Release Impact

  • This change affects published code, and I have generated a changeset.
  • This change is docs/CI/dev-only (no release).

@changeset-bot
Copy link

changeset-bot bot commented Feb 22, 2026

🦋 Changeset detected

Latest commit: c8d1f5f

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@tanstack/angular-pacer Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@benjavicente benjavicente marked this pull request as ready for review February 22, 2026 21:12
@nx-cloud
Copy link

nx-cloud bot commented Feb 27, 2026

View your CI Pipeline Execution ↗ for commit c8d1f5f

Command Status Duration Result
nx run-many --targets=build --exclude=examples/** ✅ Succeeded 18s View ↗

☁️ Nx Cloud last updated this comment at 2026-02-27 19:14:20 UTC

@pkg-pr-new
Copy link

pkg-pr-new bot commented Feb 27, 2026

More templates

@tanstack/angular-pacer

npm i https://pkg.pr.new/@tanstack/angular-pacer@161

@tanstack/pacer

npm i https://pkg.pr.new/@tanstack/pacer@161

@tanstack/pacer-devtools

npm i https://pkg.pr.new/@tanstack/pacer-devtools@161

@tanstack/pacer-lite

npm i https://pkg.pr.new/@tanstack/pacer-lite@161

@tanstack/preact-pacer

npm i https://pkg.pr.new/@tanstack/preact-pacer@161

@tanstack/preact-pacer-devtools

npm i https://pkg.pr.new/@tanstack/preact-pacer-devtools@161

@tanstack/react-pacer

npm i https://pkg.pr.new/@tanstack/react-pacer@161

@tanstack/react-pacer-devtools

npm i https://pkg.pr.new/@tanstack/react-pacer-devtools@161

@tanstack/solid-pacer

npm i https://pkg.pr.new/@tanstack/solid-pacer@161

@tanstack/solid-pacer-devtools

npm i https://pkg.pr.new/@tanstack/solid-pacer-devtools@161

commit: acc7d9f

@theVedanta
Copy link
Contributor

theVedanta commented Mar 3, 2026

ahh makes sense. Thank you for fixing this, I had missed it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants