diff --git a/CHANGELOG.md b/CHANGELOG.md index c02c953..74a9146 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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` diff --git a/csvEditorHtml/browser/beforeDomLoadedBrowser.ts b/csvEditorHtml/browser/beforeDomLoadedBrowser.ts index 3f2c42e..efe607b 100644 --- a/csvEditorHtml/browser/beforeDomLoadedBrowser.ts +++ b/csvEditorHtml/browser/beforeDomLoadedBrowser.ts @@ -68,7 +68,7 @@ var initialConfig: EditCsvConfig | undefined = { darkThemeTextColor: '#d0d0d0', lightThemeTextColor: '#657b83', convertUrlsToLinkTags: true, - autoFill: true, + dragToAutoFill: true, } function __getById(id: string): HTMLElement { diff --git a/csvEditorHtml/types.d.ts b/csvEditorHtml/types.d.ts index 4dd9a5f..33664c3 100644 --- a/csvEditorHtml/types.d.ts +++ b/csvEditorHtml/types.d.ts @@ -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 } diff --git a/csvEditorHtml/ui.ts b/csvEditorHtml/ui.ts index 3835e9e..281541a 100644 --- a/csvEditorHtml/ui.ts +++ b/csvEditorHtml/ui.ts @@ -574,7 +574,7 @@ function displayData(this: any, csvParseResult: ExtendedCsvParseResult | null, c // : `${text} ` } 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, diff --git a/out/configurationHelper.js b/out/configurationHelper.js index 0cec2b6..aecff72 100644 --- a/out/configurationHelper.js +++ b/out/configurationHelper.js @@ -55,7 +55,7 @@ const defaultConfig = { darkThemeTextColor: '#d0d0d0', lightThemeTextColor: '#657b83', convertUrlsToLinkTags: true, - autoFill: true, + dragToAutoFill: true, }; /** * returns the configuration for this extension diff --git a/package.json b/package.json index f6034e6..62ff47e 100644 --- a/package.json +++ b/package.json @@ -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" } } diff --git a/src/configurationHelper.ts b/src/configurationHelper.ts index 98c8e42..0130ce6 100644 --- a/src/configurationHelper.ts +++ b/src/configurationHelper.ts @@ -55,7 +55,7 @@ const defaultConfig: EditCsvConfig = { darkThemeTextColor: '#d0d0d0', lightThemeTextColor: '#657b83', convertUrlsToLinkTags: true, - autoFill: true, + dragToAutoFill: true, } /**