Skip to content

Commit

Permalink
v0.3.1 (#39)
Browse files Browse the repository at this point in the history
Fixed
- #36 
- #37
  • Loading branch information
ganesshkumar authored May 14, 2022
1 parent 84f5fc5 commit 27096ee
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 8 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ An Obsidian plugin to provide an editor for Markdown tables. It can open CSV, Mi
![Obsidian Table Editor](https://user-images.githubusercontent.com/2135089/155855554-28f69b38-1f1c-4287-b2da-ba0b75ecc1e1.png)


[![Tag 0.3.0](https://img.shields.io/badge/tag-0.3.0-blue)](https://github.com/ganesshkumar/obsidian-table-editor)
[![Tag 0.3.1](https://img.shields.io/badge/tag-0.3.1-blue)](https://github.com/ganesshkumar/obsidian-table-editor)
[![MIT License](https://img.shields.io/github/license/ganesshkumar/obsidian-table-editor)](LICENSE)
[![codecov](https://codecov.io/gh/ganesshkumar/obsidian-table-editor/branch/master/graph/badge.svg?token=G6IK79F5FR)](https://codecov.io/gh/ganesshkumar/obsidian-table-editor)

Expand Down
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "markdown-table-editor",
"name": "Markdown Table Editor",
"version": "0.3.0",
"version": "0.3.1",
"minAppVersion": "0.12.0",
"description": "An Obsidian plugin to provide an editor for Markdown tables. It can open CSV, Microsoft Excel/Google Sheets data as Markdown tables from Obsidian Markdown editor.",
"author": "Ganessh Kumar R P <[email protected]>",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "markdown-table-editor",
"version": "0.3.0",
"version": "0.3.1",
"description": "An Obsidian plugin to provide an editor for Markdown tables. It can open CSV, Microsoft Excel/Google Sheets data as Markdown tables from Obsidian Markdown editor.",
"main": "main.js",
"scripts": {
Expand Down
6 changes: 4 additions & 2 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,9 @@ class MarkdownEditorSettingTab extends PluginSettingTab {
.setPlaceholder('3')
.setValue(this.plugin.settings.defaultRows.toString())
.onChange(async (value) => {
const rows = parseInt(value)
let rows = parseInt(value);
if (!rows) {
rows = 0;
new Notice('Rows has to be positive number. Defaulting to 3');
}
this.plugin.settings.defaultRows = rows || 3;
Expand All @@ -104,8 +105,9 @@ class MarkdownEditorSettingTab extends PluginSettingTab {
.setPlaceholder('3')
.setValue(this.plugin.settings.defaultColumns.toString())
.onChange(async (value) => {
const cols = parseInt(value)
let cols = parseInt(value);
if (!cols) {
cols = 0;
new Notice('Columns has to be positive number. Defaulting to 3');
}
this.plugin.settings.defaultColumns = cols || 3;
Expand Down
4 changes: 2 additions & 2 deletions src/views/TableEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,8 @@ export const TableEditor = ({ leafId, cursor, inputData, updateViewData, supress
return (
<>
<div className='mte button-container'>
Rows : <input type='text' onChange={e => setNewRows(parseInt(e.target.value))} value={newRows} />
Columns : <input type='text' onChange={e => setNewCols(parseInt(e.target.value))} value={newCols} />
Rows : <input type='text' onChange={e => setNewRows(parseInt(e.target.value) || 0)} value={newRows} />
Columns : <input type='text' onChange={e => setNewCols(parseInt(e.target.value) || 0)} value={newCols} />
<button onClick={newTableClicked}>New Table</button>
<button onClick={clearClicked}>Clear Table</button>
</div>
Expand Down
3 changes: 2 additions & 1 deletion versions.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@
"0.2.2": "0.12.0",
"0.2.3": "0.12.0",
"0.2.4": "0.12.0",
"0.3.0": "0.12.0"
"0.3.0": "0.12.0",
"0.3.1": "0.12.0"
}

0 comments on commit 27096ee

Please sign in to comment.