Skip to content

Commit

Permalink
chore: fix incorrect row adding (DevExpress#908)
Browse files Browse the repository at this point in the history
  • Loading branch information
kvet authored Apr 10, 2018
1 parent 8ffa6de commit 8ccfcb7
Show file tree
Hide file tree
Showing 10 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export default class Demo extends React.PureComponent {
commitChanges({ added, changed, deleted }) {
let { rows } = this.state;
if (added) {
const startingAddedId = (rows.length - 1) > 0 ? rows[rows.length - 1].id + 1 : 0;
const startingAddedId = rows.length > 0 ? rows[rows.length - 1].id + 1 : 0;
rows = [
...rows,
...added.map((row, index) => ({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export default class Demo extends React.PureComponent {
this.commitChanges = ({ added, changed, deleted }) => {
let { rows } = this.state;
if (added) {
const startingAddedId = (rows.length - 1) > 0 ? rows[rows.length - 1].id + 1 : 0;
const startingAddedId = rows.length > 0 ? rows[rows.length - 1].id + 1 : 0;
rows = [
...rows,
...added.map((row, index) => ({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export default class Demo extends React.PureComponent {
this.commitChanges = ({ added, changed, deleted }) => {
let { rows } = this.state;
if (added) {
const startingAddedId = (rows.length - 1) > 0 ? rows[rows.length - 1].id + 1 : 0;
const startingAddedId = rows.length > 0 ? rows[rows.length - 1].id + 1 : 0;
rows = [
...rows,
...added.map((row, index) => ({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ export default class Demo extends React.PureComponent {
this.commitChanges = ({ added, changed, deleted }) => {
let { rows } = this.state;
if (added) {
const startingAddedId = (rows.length - 1) > 0 ? rows[rows.length - 1].id + 1 : 0;
const startingAddedId = rows.length > 0 ? rows[rows.length - 1].id + 1 : 0;
rows = [
...rows,
...added.map((row, index) => ({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export default class Demo extends React.PureComponent {
commitChanges({ added, changed, deleted }) {
let { rows } = this.state;
if (added) {
const startingAddedId = (rows.length - 1) > 0 ? rows[rows.length - 1].id + 1 : 0;
const startingAddedId = rows.length > 0 ? rows[rows.length - 1].id + 1 : 0;
rows = [
...rows,
...added.map((row, index) => ({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export default class Demo extends React.PureComponent {
commitChanges({ added, changed, deleted }) {
let { rows } = this.state;
if (added) {
const startingAddedId = (rows.length - 1) > 0 ? rows[rows.length - 1].id + 1 : 0;
const startingAddedId = rows.length > 0 ? rows[rows.length - 1].id + 1 : 0;
rows = [
...rows,
...added.map((row, index) => ({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export default class Demo extends React.PureComponent {
commitChanges({ added, changed, deleted }) {
let { rows } = this.state;
if (added) {
const startingAddedId = (rows.length - 1) > 0 ? rows[rows.length - 1].id + 1 : 0;
const startingAddedId = rows.length > 0 ? rows[rows.length - 1].id + 1 : 0;
rows = [
...rows,
...added.map((row, index) => ({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ export default class Demo extends React.PureComponent {
this.commitChanges = ({ added, changed, deleted }) => {
let { rows } = this.state;
if (added) {
const startingAddedId = (rows.length - 1) > 0 ? rows[rows.length - 1].id + 1 : 0;
const startingAddedId = rows.length > 0 ? rows[rows.length - 1].id + 1 : 0;
rows = [
...rows,
...added.map((row, index) => ({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ export default class Demo extends React.PureComponent {
this.commitChanges = ({ added, changed, deleted }) => {
let { rows } = this.state;
if (added) {
const startingAddedId = (rows.length - 1) > 0 ? rows[rows.length - 1].id + 1 : 0;
const startingAddedId = rows.length > 0 ? rows[rows.length - 1].id + 1 : 0;
rows = [
...rows,
...added.map((row, index) => ({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ class DemoBase extends React.PureComponent {
this.commitChanges = ({ added, changed, deleted }) => {
let { rows } = this.state;
if (added) {
const startingAddedId = (rows.length - 1) > 0 ? rows[rows.length - 1].id + 1 : 0;
const startingAddedId = rows.length > 0 ? rows[rows.length - 1].id + 1 : 0;
rows = [
...rows,
...added.map((row, index) => ({
Expand Down

0 comments on commit 8ccfcb7

Please sign in to comment.