Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/revolist/revogrid-number
Number column type for RevoGrid system
https://github.com/revolist/revogrid-number
Last synced: 5 days ago
JSON representation
Number column type for RevoGrid system
- Host: GitHub
- URL: https://github.com/revolist/revogrid-number
- Owner: revolist
- License: mit
- Created: 2020-10-22T10:22:28.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2020-10-23T14:59:14.000Z (about 4 years ago)
- Last Synced: 2024-05-02T02:21:32.056Z (7 months ago)
- Language: TypeScript
- Size: 35.2 KB
- Stars: 2
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# revogrid-number
Number column type for RevoGrid system.Column type depends on [numbro](http://numbrojs.com/format.html) library.
Use any format you love to assign number format for your grid.
For example:```js
import NumberColumnType from '@revolist/revogrid-number';
const columnTypes = {
'numeric': new NumberColumnType({thousandSeparated: true, mantissa: 5})
};
const columns = [
{
prop: 'Num',
name: 'My number',
columnType: 'numeric'
},
{
prop: 'Num2',
name: 'My number2',
columnType: 'numeric'
}
];
const rows = [{
'Num': 132322332,
'Num2': 32322
}];const grid = document.querySelector('revo-grid');
grid.columnTypes = columnTypes;
grid.source = rows;
grid.columns = columns;
```