Skip to content

[4.x] Cast id to string to avoid snowflake ids being treated as floats#89

Closed
RhysLees wants to merge 1 commit intorelaticle:4.xfrom
RhysLees:patch-1
Closed

[4.x] Cast id to string to avoid snowflake ids being treated as floats#89
RhysLees wants to merge 1 commit intorelaticle:4.xfrom
RhysLees:patch-1

Conversation

@RhysLees
Copy link

@RhysLees RhysLees commented Mar 6, 2026

Using snowflakes instead of standard ids causes ids to be treated as floats changing the id.

for example task.id is 420533451316027392 when using

@js(['recordKey' => $record['id']]))"

the snowflake is being treated by js as a float and losing precision so casting to a string resolves this.

@js(['recordKey' => (string) $record['id']]))"

Closes #88

@RhysLees RhysLees changed the title Cast id to string to avoid snowflake ids being treated as floats [4.x] Cast id to string to avoid snowflake ids being treated as floats Mar 6, 2026
@ManukMinasyan
Copy link
Contributor

Thanks for the fix @RhysLees! Your root cause analysis was spot on.

Closing this in favor of #91 (3.x) and #92 (4.x) which apply the fix at the data layer in formatBoardRecord() instead of the Blade template. This way the ID is always a string for any downstream usage, preventing the same issue from recurring if new templates or JS paths are added.

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.

[Bug]: cardAction does evaluate record on action

2 participants