Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

DataGrid::addColumnNumber - when int value is large, shows different last few digits #1143

Open
stepanhampl opened this issue Aug 15, 2024 · 1 comment

Comments

@stepanhampl
Copy link

stepanhampl commented Aug 15, 2024

In my case, these calls produce different output:

$grid->addColumnNumber('XId', 'X ID');
$grid->addColumnNumber('XIdFixed', 'X ID Fixed')
    ->setRenderer(fn (Entity $entity) => $entity->getXId() ? (string) $entity->getXId() : ''); // getting the same columnn as the call above

In DataGrid, first one shows this:
1 234 567 891 234 567 936

While second one correctly shows this number (which is the same as postgres DB value):
1234567891234567891

I don't care about extra spacing. The problem are the last 3 digits: *936 vs. *891.

I use:

  • QueryBuilder to feed DataGrid
  • I tried ulaboo/datagrid v6.10.0 and v6.9.5 (both seem to behave the same in this scenario)
@radimvaculik
Copy link
Member

Hi @stepanhampl , could you prepare a pull request, please?

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Development

No branches or pull requests

2 participants