Skip to content

Commit 024a19b

Browse files
authored
feat: add option to show/hide row numbers column (#412)
* feat: add option to show/hide row numbers column in data grid (#409) * fix: clean xcstrings whitespace churn, add showRowNumbers tests
1 parent 9e675a9 commit 024a19b

13 files changed

Lines changed: 20938 additions & 20809 deletions

File tree

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
### Added
11+
12+
- Show/hide row numbers column in data grid (Settings > Data Grid)
13+
1014
## [0.22.0] - 2026-03-21
1115

1216
### Added

TablePro/Models/Settings/AppSettings.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -314,6 +314,7 @@ struct DataGridSettings: Codable, Equatable {
314314
var nullDisplay: String
315315
var defaultPageSize: Int
316316
var showAlternateRows: Bool
317+
var showRowNumbers: Bool
317318
var autoShowInspector: Bool
318319

319320
static let `default` = DataGridSettings(
@@ -322,6 +323,7 @@ struct DataGridSettings: Codable, Equatable {
322323
nullDisplay: "NULL",
323324
defaultPageSize: 1_000,
324325
showAlternateRows: true,
326+
showRowNumbers: true,
325327
autoShowInspector: false
326328
)
327329

@@ -331,13 +333,15 @@ struct DataGridSettings: Codable, Equatable {
331333
nullDisplay: String = "NULL",
332334
defaultPageSize: Int = 1_000,
333335
showAlternateRows: Bool = true,
336+
showRowNumbers: Bool = true,
334337
autoShowInspector: Bool = false
335338
) {
336339
self.rowHeight = rowHeight
337340
self.dateFormat = dateFormat
338341
self.nullDisplay = nullDisplay
339342
self.defaultPageSize = defaultPageSize
340343
self.showAlternateRows = showAlternateRows
344+
self.showRowNumbers = showRowNumbers
341345
self.autoShowInspector = autoShowInspector
342346
}
343347

@@ -349,6 +353,7 @@ struct DataGridSettings: Codable, Equatable {
349353
nullDisplay = try container.decodeIfPresent(String.self, forKey: .nullDisplay) ?? "NULL"
350354
defaultPageSize = try container.decodeIfPresent(Int.self, forKey: .defaultPageSize) ?? 1_000
351355
showAlternateRows = try container.decodeIfPresent(Bool.self, forKey: .showAlternateRows) ?? true
356+
showRowNumbers = try container.decodeIfPresent(Bool.self, forKey: .showRowNumbers) ?? true
352357
autoShowInspector = try container.decodeIfPresent(Bool.self, forKey: .autoShowInspector) ?? false
353358
}
354359

0 commit comments

Comments
 (0)