Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new selectOnFocus prop #2

Merged
merged 24 commits into from
Jan 11, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
e0a0b79
Add new `selectOnFocus` prop
breadadams Jun 1, 2020
e7b5272
Include dist files in repo
breadadams Jun 5, 2020
4fe9030
Add `keyModifier` prop
breadadams Jun 9, 2020
653c4b5
Update TS definitions
breadadams Jun 9, 2020
b4a0684
Update build
breadadams Jun 9, 2020
6d42dca
Update `keyModifier` prop
breadadams Jun 9, 2020
206b43d
build: target react 17
Kikobeats Mar 26, 2021
650ba49
chore: remove node dependency
Kikobeats Jan 4, 2022
af592da
chore: revert 650ba49d
breadadams Jan 10, 2022
06470e7
Merge branch 'master' of github.com:mac-s-g/react-json-view into feat…
breadadams Jan 10, 2022
84b8110
fix: AutosizeTextarea `ref` prop
breadadams Jan 10, 2022
7777060
chore: update package lock
breadadams Jan 10, 2022
4f74c99
chore: linter fixes
breadadams Jan 10, 2022
f564ddc
Merge pull request #3 from microlinkhq/feat-allow-textarea-select-update
Kikobeats Jan 10, 2022
ce774c5
build: remove unnecessary files
Kikobeats Jan 10, 2022
f93ea65
build: beautify package.json
Kikobeats Jan 10, 2022
3d565cd
ci: better tests setup
Kikobeats Jan 10, 2022
b691f82
chore: dependency updates
breadadams Jan 11, 2022
cc6cfd5
build: remove dist from repo
breadadams Jan 11, 2022
044e869
chore: package.json updates
breadadams Jan 11, 2022
e150a8a
fix: action config
breadadams Jan 11, 2022
168ec64
Merge pull request #9 from microlinkhq/feat-allow-textarea-select-upd…
Kikobeats Jan 11, 2022
6db784f
Update main.yml
Kikobeats Jan 11, 2022
999f991
build: bump typescript dep.
breadadams Jan 11, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .coveralls.yml

This file was deleted.

11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
version: 2
updates:
- package-ecosystem: npm
directory: "/"
schedule:
interval: daily
- package-ecosystem: "github-actions"
directory: "/"
schedule:
# Check for updates to GitHub Actions every weekday
interval: "daily"
25 changes: 0 additions & 25 deletions .github/workflows/ci-tests.yml

This file was deleted.

40 changes: 40 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: test

on:
push:
branches:
- feat-allow-textarea-select
pull_request:
branches:
- feat-allow-textarea-select

jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: lts/*
- name: Install
run: npm install --no-package-lock --force
- name: Test
run: npm test
# - name: Report
# run: mkdir -p coverage && npx c8 report --reporter=text-lcov > coverage/lcov.info
# - name: Coverage
# uses: coverallsapp/github-action@master
# with:
# github-token: ${{ secrets.GITHUB_TOKEN }}
# - name: Release
# if: ${{ github.ref == 'refs/heads/master' && !startsWith(github.event.head_commit.message, 'chore(release):') && !startsWith(github.event.head_commit.message, 'docs:') }}
# shell: 'script -q -e -c "bash {0}"'
# env:
# CONVENTIONAL_GITHUB_RELEASER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
# run: |
# git config --global user.email ${{ secrets.GIT_EMAIL }}
# git config --global user.name ${{ secrets.GIT_USERNAME }}
# npm run release
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
npm-debug.log

/coverage
/dist
/debug
/dist
/node_modules

.nyc_output
10 changes: 0 additions & 10 deletions .travis.yml

This file was deleted.

1 change: 1 addition & 0 deletions dev-server/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ ReactDom.render(
src.constructor &&
src.constructor.name === 'Moment'
}
selectOnFocus
/>

<br />
Expand Down
12 changes: 12 additions & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,18 @@ export interface ReactJsonViewProps {
* Default: null
*/
defaultValue?: TypeDefaultValue | TypeDefaultValue[] | null;
/**
* Whether to select the textarea contents on edit
*
* Default: false
*/
selectOnFocus?: boolean;
/**
* The key modifier to be combined with a click on JSON values to edit them
*
* Default: (e) => e.metaKey || e.ctrlKey
*/
keyModifier?: (event: Event, type: 'edit' | 'submit') => boolean;
}

export interface OnCopyProps {
Expand Down
Loading