Interest in possible new Field::Float component
Created by: javierjulio
I have a project with coordinates for tons of locations and their precision matters but it also varies (e.g. some are 4 decimals some are 6). Administrate works fine detecting that I have a float field (Postgres) and uses Field::Number
. But the problem is it sets decimals: 2
and if you remove it, it uses a default of 0 so you lose all decimals. I figured this is fine for most numbers but not all the time yet I have no way around it. Since I have data that varies in precision its very important to see its exact value and not round it up or down. I did try using Field::String
but then that causes search to fail.
I'd be happy to contribute a PR if there is interest in accepting a new Field::Float
or something like that, where it has inherits or uses the same functionality of Field::Number
but without the default of 0 for the decimals option. Would that be of interest?