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

feat: implement inline edit on table #1933

Merged
merged 15 commits into from
Oct 25, 2020

Conversation

amontalvof
Copy link
Collaborator

fix: #502

Changes proposed in this PR:

@nexxtway/react-rainbow

@commit-lint
Copy link

commit-lint bot commented Oct 20, 2020

Features

  • implemented inline edit on table (3a52fc2)
  • implementation inline editing on table (1a69565)
  • deleted getBorderRadius function (de0e55a)
  • added onkeydown interaction (5fedac2)
  • fixed example on readme (940c890)
  • added tests for inline edit columns (4b219f2)
  • fixed example in inline edit example (e1424c7)
  • fixed style on table inline edit example (701283e)
  • fixed names of inline edit tests (f8848c1)

Contributors

@amontalvof, @TahimiLeonBravo, @LeandroTorresSicilia

Commit-Lint commands

You can trigger Commit-Lint actions by commenting on this PR:

  • @Commit-Lint merge patch will merge dependabot PR on "patch" versions (X.X.Y - Y change)
  • @Commit-Lint merge minor will merge dependabot PR on "minor" versions (X.Y.Y - Y change)
  • @Commit-Lint merge major will merge dependabot PR on "major" versions (Y.Y.Y - Y change)
  • @Commit-Lint merge disable will desactivate merge dependabot PR
  • @Commit-Lint review will approve dependabot PR
  • @Commit-Lint stop review will stop approve dependabot PR

src/components/Table/body/cell.js Show resolved Hide resolved
src/components/Table/body/icons/cancel.js Show resolved Hide resolved
src/components/Table/body/cell.js Show resolved Hide resolved
src/components/Table/body/icons/edit.js Outdated Show resolved Hide resolved
src/components/Table/body/editableCell.js Show resolved Hide resolved
@LeandroTorresSicilia LeandroTorresSicilia changed the title Implement inline edit on table feat: implement inline edit on table Oct 21, 2020
@LeandroTorresSicilia
Copy link
Member

there is a lint error

});

it('should render an input with the received value when click inside the EditableCell', () => {
const component = mount(
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Identical blocks of code found in 6 locations. Consider refactoring.

});

it('should clear the input when click in button clear', () => {
const component = mount(
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Identical blocks of code found in 6 locations. Consider refactoring.

@@ -1446,4 +1469,166 @@ describe('<Table />', () => {
}
});
});

it('should return a table with EditableCell', () => {
const component = mount(
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Identical blocks of code found in 6 locations. Consider refactoring.

});

it('should render a span with the received value of the data inside the EditableCell', () => {
const component = mount(
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Identical blocks of code found in 6 locations. Consider refactoring.

});

it('should unmount the input when blur', () => {
const component = mount(
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Identical blocks of code found in 6 locations. Consider refactoring.

@codeclimate
Copy link

codeclimate bot commented Oct 25, 2020

Code Climate has analyzed commit 571b00d and detected 37 issues on this pull request.

Here's the issue category breakdown:

Category Count
Complexity 5
Duplication 32

View more on Code Climate.

@LeandroTorresSicilia LeandroTorresSicilia merged commit 19dc8f6 into master Oct 25, 2020
@LeandroTorresSicilia LeandroTorresSicilia deleted the implement-inline-edit-on-table branch October 25, 2020 15:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feat: implement inline edit to the Table component
3 participants