Skip to content

테이블 로우를 담는 배열을 객체를 담는 것으로 변환 하는 방안 #5

Description

@devkimson
let rows = [];

rows를 담을 때 문자열을 받아 넣는데 객체에 담아 배열을 형성해야 정렬할 때 기준이 생길 것으로 보임.

sort나 reverse 시 기준 값이되는 인덱스값이 없어서 '원래대로' 돌리는 버튼이 생긴다면 구현이 어려울 것으로 보임.


// 아래는 예제
function sample(idx, text){ // 이후 날짜, 작성자를 추가할 예정, 태그 포함
  return {
     idx: idx,
     text: text,
     regdate: new Date().getTime()
  }
}

객체로 받아 배열에 담고 관리하는 방식으로 변경 어떤지

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions