Plain JavaScript / TypeScript
You can find it on stackblitz: stackblitz-guiexpert-tableplain-js-simple.
Add the following NPM package to your existing plain js project (run this in your project root directory):
If you have a project without NPM, you can directly include the guiexpert module by manually downloading the necessary files and adding them to your project directory. Typically, you can download the required files from the official website or the repository of the guiexpert module.
After downloading, you can copy the files into your project directory and then use appropriate script tags in your HTML file to utilize the guiexpert module.
Here’s a basic example:
Replace “Path/To/guiexpert.js” with the actual path to your downloaded guiexpert.js file.
Keep in mind that this may depend on any dependencies that guiexpert itself might have. You might also need to manually download and include other files or libraries if they are required by guiexpert.
Also, note that using NPM typically makes managing dependencies easier and simplifies integrating modules into projects. Manual inclusion might require more effort to ensure everything works correctly and stays up to date.
Add an empty <div> element to your html code:
Be sure, that your div container expands. Add this CSS rule to your parent component’s style.
Include (from a CDN) the predefined @guiexpert/table CSS rules to your project. You can do it by adding this tag in your index.html…
If you are working with plain JS, you don’t need to do this. If you are using TypeScript as a language, please import the following classes:
Create a table model. Select (‘querySelector’) the <div> element and create a table scope. Finally, call firstInit() at least once. Below, you will see the plain TS version. For plain JS, remove ’: TableModelIf’.