I need to display a list of data from firestore. Can anyone recommend a good grid or table package to use?
Most of the packages I have seen are based on Angular and I would prefer an example which uses Ionic 3.
Ionic is based Angular (currently), so you can leverage other Angular solutions. I have used the Angular Material’s table in a project.
Thanks spent a few hours working with ag-grid in Ionic3 and finally got it working.
How did you manage to make it work? I can’t load the external css files
I had the same problem - I solved it by opening the css files and copy/paste them into the app.sccs file.
Since them I have tried it in Ionic 4 and the links to the css files works OK with it.
If you are sticking with Ionic 3 then perhaps try copy and paste the css files into a new sccs file and linking to the sccs files - I have not tried that but it might work.
If you want I could send you my attempt.
I found the solution!
- externalize your sass.config.js (you can find it under node_modules@ionic\app-scripts\config)
- override only the includePath property like in the example below
module.exports = {
/**
* includePaths: Used by node-sass for additional
* paths to search for sass imports by just name.
*/
includePaths: [
'node_modules/ionic-angular/themes',
'node_modules/ionicons/dist/scss',
'node_modules/ionic-angular/fonts',
'node_modules/ag-grid-community/dist/styles'
]
};
- in your package.json include your sass custom configuration file like in the example below
"config": {
"ionic_webpack": "./webpack.config.js",
"ionic_uglifyjs": "./uglifyjs.config.js",
"ionic_sass": "./sass.config.js"
}
- then in the page that uses the ag-grid style include the desired styles
// importing the custom ag-grid css and theme
@import 'ag-grid';
@import 'ag-theme-material';
page-report {
}
That’s all!
That is a really good solution!