Skip to content

Commit

Permalink
- changed option autoFill to dragToAutoFill #152
Browse files Browse the repository at this point in the history
  • Loading branch information
janisdd committed Jun 22, 2024
1 parent 7e7b77b commit 468e29f
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

- fixed issue #147: add feature to automatically reload data if the source csv file changes
- fixed issue #152: support drag and paste like excel
- enabled `autoFill`/`fillHandle` option
- enabled `dragToAutoFill`/`fillHandle` option
- only supports copying same sequences `1,2,3` will copy `1,2,3` again not `4,5,6`


Expand Down
2 changes: 1 addition & 1 deletion csvEditorHtml/browser/beforeDomLoadedBrowser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ var initialConfig: EditCsvConfig | undefined = {
darkThemeTextColor: '#d0d0d0',
lightThemeTextColor: '#657b83',
convertUrlsToLinkTags: true,
autoFill: true,
dragToAutoFill: true,
}

function __getById(id: string): HTMLElement {
Expand Down
2 changes: 1 addition & 1 deletion csvEditorHtml/types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ type EditCsvConfig = {
/**
* true: adds a drag handle to cells in order to easily drag and copy data, false: no drag handle is shown
*/
autoFill: boolean
dragToAutoFill: boolean

}

Expand Down
2 changes: 1 addition & 1 deletion csvEditorHtml/ui.ts
Original file line number Diff line number Diff line change
Expand Up @@ -574,7 +574,7 @@ function displayData(this: any, csvParseResult: ExtendedCsvParseResult | null, c
// : `${text} <span class="remove-row clickable" onclick="removeRow(${row})" style="visibility: hidden"><i class="fas fa-trash"></i></span>`
} as any,
afterChange: onAnyChange, //only called when cell value changed (e.g. not when col/row removed)
fillHandle: initialConfig?.autoFill ? {
fillHandle: initialConfig?.dragToAutoFill ? {
autoInsertRow: false,
} : undefined,
undo: true,
Expand Down
2 changes: 1 addition & 1 deletion out/configurationHelper.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -655,9 +655,9 @@
"default": true,
"description": "true: if a cell contains url-like text, the urls are displayed as urls and can be clicked on. false: all urls are rendered as normal text"
},
"csv-edit.autoFill": {
"csv-edit.dragToAutoFill": {
"type": "boolean",
"default": true,
"default": false,
"description": "true: adds a drag handle to cells in order to easily drag and copy data, false: no drag handle is shown"
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/configurationHelper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ const defaultConfig: EditCsvConfig = {
darkThemeTextColor: '#d0d0d0',
lightThemeTextColor: '#657b83',
convertUrlsToLinkTags: true,
autoFill: true,
dragToAutoFill: true,
}

/**
Expand Down

0 comments on commit 468e29f

Please sign in to comment.