fix(731-1): 일위대가표 줄 끝 ⋯ 단추 — 우클릭 · 길게 누름 없이도 위로 · 아래로 · 별칭 · 삭제
- 마우스 우클릭 · 길게 누름 삭제는 개인 · 마스터 층 모두 이미 되었음(재현 0) — 삭제 길이 눈에 안 보이는 것이 까닭 - 공용 표(ui_template_data_table)에 rowMenu 옵션 추가(첫 칸 오른쪽 ⋯ · 누르면 줄 누름 없이 메뉴만) · 일위대가표가 같은 메뉴를 연결 - 지킴 시험 test_ui_data_table 에 rowMenu 한 건 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -96,6 +96,24 @@ console.log(
|
||||
total: { x: 3 },
|
||||
rowClass: (i) => (i === 0 ? "is-title" : null),
|
||||
}),
|
||||
rowMenu: m.renderDataTableHtml({
|
||||
columns: [
|
||||
{ key: "a", label: "A" },
|
||||
{ key: "b", label: "B" },
|
||||
],
|
||||
rows: [
|
||||
{ a: "제목", b: 1 },
|
||||
{ a: "줄", b: 2 },
|
||||
{ a: "줄2", b: 3 },
|
||||
],
|
||||
onRowClick: () => undefined,
|
||||
rowMenu: { show: (i) => i > 0, open: () => undefined },
|
||||
}),
|
||||
noRowMenu: m.renderDataTableHtml({
|
||||
columns: [{ key: "a", label: "A" }],
|
||||
rows: [{ a: "줄" }],
|
||||
onRowClick: () => undefined,
|
||||
}),
|
||||
scale: m.SCALE,
|
||||
widths: m.renderDataTableHtml({
|
||||
columns: [
|
||||
|
||||
@@ -122,3 +122,15 @@ def test_155_2_줄_꼴_곁값(r):
|
||||
assert rc.count("is-title") == 1 # 합계 줄엔 안 붙음
|
||||
assert "white-space-collapse: preserve-spaces;" in r["css"]
|
||||
assert "tr.is-title td" in r["css"]
|
||||
|
||||
|
||||
def test_줄_끝_메뉴_단추_731(r):
|
||||
"""rowMenu — show 참인 줄의 첫 칸에만 ⋯ 단추 · 없으면 단추 없음 · 줄 번호가 data-more 로."""
|
||||
rows = r["rowMenu"].split("<tbody>")[1].split("</tbody>")[0].split("</tr>")[:3]
|
||||
assert "data-more" not in rows[0]
|
||||
for i in (1, 2):
|
||||
assert rows[i].count("data-more") == 1
|
||||
assert f'data-more="{i}"' in rows[i]
|
||||
assert rows[i].split("</td>")[0].count("data-more") == 1 # 첫 칸 안
|
||||
assert 'class="ui-icon-btn ui-icon-btn--ghost ui-data-table__more"' in rows[1]
|
||||
assert "data-more" not in r["noRowMenu"]
|
||||
|
||||
Reference in New Issue
Block a user