Skip to content

Commit

Permalink
chore: remove Remote Example & replace with Import from CSV
Browse files Browse the repository at this point in the history
  • Loading branch information
ghiscoding committed Jan 19, 2025
1 parent 76f8624 commit dc239d4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 161 deletions.
9 changes: 6 additions & 3 deletions src/examples/slickgrid/Example17.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,16 @@ export default function Example17() {
}

function handleFileImport(event: any) {
const file = event.target.files[0];
if (file) {
const file: File = event.target.files[0];
if (file.name.endsWith('.csv')) {
const reader = new FileReader();
reader.onload = (e: any) => {
const content = e.target.result;
dynamicallyCreateGrid(content);
};
reader.readAsText(file);
} else {
alert('File must be a CSV file');
}
}

Expand Down Expand Up @@ -135,7 +137,8 @@ export default function Example17() {
<button id="uploadBtn" data-test="static-data-btn" className="btn btn-outline-secondary" onClick={() => handleDefaultCsv()}>
Use default CSV data
</button>
<button className="btn btn-outline-secondary ms-1" onClick={() => destroyGrid()}>Destroy Grid</button>
&nbsp;/
<button className="btn btn-outline-danger btn-sm ms-2" onClick={() => destroyGrid()}>Destroy Grid</button>
</div>
</div>

Expand Down
158 changes: 0 additions & 158 deletions src/examples/slickgrid/Example43.tsx

This file was deleted.

0 comments on commit dc239d4

Please sign in to comment.