Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions Package.resolved

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ import Vexil
extension FlagTextField where Value.BoxedValueType: BinaryFloatingPoint {

init(configuration: FlagControlConfiguration<Value>) {
self = Self(
self.init(
configuration: configuration,
formatted: \.asString,
editingFormat: { $0 },
)
#if os(iOS) || os(tvOS)
.keyboardType(.decimalPad)
keyboardType = .decimalPad
#endif
}

Expand Down Expand Up @@ -56,13 +56,13 @@ extension FlagControlConfiguration: FloatingPointTextFieldRepresentable where Va
extension FlagTextField {

init<Wrapped>(configuration: FlagControlConfiguration<Wrapped?>) where Value == Wrapped?, Wrapped.BoxedValueType: BinaryFloatingPoint {
self = Self(
self.init(
configuration: configuration,
formatted: \.asStringOrEmpty,
editingFormat: { $0 },
)
#if os(iOS) || os(tvOS)
.keyboardType(.decimalPad)
keyboardType = .decimalPad
#endif

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ import Vexil
extension FlagTextField where Value.BoxedValueType: BinaryInteger {

init(configuration: FlagControlConfiguration<Value>) {
self = Self(
self.init(
configuration: configuration,
formatted: \.asString,
editingFormat: { $0.filter(\.isNumber) },
)
#if os(iOS) || os(tvOS)
.keyboardType(.numberPad)
keyboardType = .numberPad
#endif
}

Expand Down Expand Up @@ -56,13 +56,13 @@ extension FlagControlConfiguration: IntegerFlagTextFieldRepresentable where Valu
extension FlagTextField {

init<Wrapped>(configuration: FlagControlConfiguration<Wrapped?>) where Value == Wrapped?, Wrapped.BoxedValueType: BinaryInteger {
self = Self(
self.init(
configuration: configuration,
formatted: \.asStringOrEmpty,
editingFormat: { $0.filter(\.isNumber) },
)
#if os(iOS) || os(tvOS)
.keyboardType(.numberPad)
keyboardType = .numberPad
#endif
}

Expand Down
2 changes: 1 addition & 1 deletion Sources/Vexillographer/FlagControl/FlagTextField.swift
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
private var format: (String) -> String
private var editingFormat: (String) -> String
#if os(iOS) || os(tvOS)
private var keyboardType = UIKeyboardType.default
var keyboardType = UIKeyboardType.default
#endif

@State
Expand Down Expand Up @@ -65,16 +65,16 @@
.keyboardType(keyboardType)
#endif
}
.onChange(of: value.boxedFlagValue) { _ in

Check warning on line 68 in Sources/Vexillographer/FlagControl/FlagTextField.swift

View workflow job for this annotation

GitHub Actions / visionOS Matrix (26.2, macos-26)

'onChange(of:perform:)' was deprecated in visionOS 1.0: Use `onChange` with a two or zero parameter action closure instead.

Check warning on line 68 in Sources/Vexillographer/FlagControl/FlagTextField.swift

View workflow job for this annotation

GitHub Actions / visionOS Matrix (26.2, macos-26)

'onChange(of:perform:)' was deprecated in visionOS 1.0: Use `onChange` with a two or zero parameter action closure instead.

Check warning on line 68 in Sources/Vexillographer/FlagControl/FlagTextField.swift

View workflow job for this annotation

GitHub Actions / visionOS Matrix (26.3, macos-26)

'onChange(of:perform:)' was deprecated in visionOS 1.0: Use `onChange` with a two or zero parameter action closure instead.

Check warning on line 68 in Sources/Vexillographer/FlagControl/FlagTextField.swift

View workflow job for this annotation

GitHub Actions / visionOS Matrix (26.3, macos-26)

'onChange(of:perform:)' was deprecated in visionOS 1.0: Use `onChange` with a two or zero parameter action closure instead.

Check warning on line 68 in Sources/Vexillographer/FlagControl/FlagTextField.swift

View workflow job for this annotation

GitHub Actions / visionOS Matrix (26.4, macos-26)

'onChange(of:perform:)' was deprecated in visionOS 1.0: Use `onChange` with a two or zero parameter action closure instead.

Check warning on line 68 in Sources/Vexillographer/FlagControl/FlagTextField.swift

View workflow job for this annotation

GitHub Actions / visionOS Matrix (26.4, macos-26)

'onChange(of:perform:)' was deprecated in visionOS 1.0: Use `onChange` with a two or zero parameter action closure instead.
cachedText = nil
}
.onChange(of: cachedText) { newText in

Check warning on line 71 in Sources/Vexillographer/FlagControl/FlagTextField.swift

View workflow job for this annotation

GitHub Actions / visionOS Matrix (26.2, macos-26)

'onChange(of:perform:)' was deprecated in visionOS 1.0: Use `onChange` with a two or zero parameter action closure instead.

Check warning on line 71 in Sources/Vexillographer/FlagControl/FlagTextField.swift

View workflow job for this annotation

GitHub Actions / visionOS Matrix (26.2, macos-26)

'onChange(of:perform:)' was deprecated in visionOS 1.0: Use `onChange` with a two or zero parameter action closure instead.

Check warning on line 71 in Sources/Vexillographer/FlagControl/FlagTextField.swift

View workflow job for this annotation

GitHub Actions / visionOS Matrix (26.3, macos-26)

'onChange(of:perform:)' was deprecated in visionOS 1.0: Use `onChange` with a two or zero parameter action closure instead.

Check warning on line 71 in Sources/Vexillographer/FlagControl/FlagTextField.swift

View workflow job for this annotation

GitHub Actions / visionOS Matrix (26.3, macos-26)

'onChange(of:perform:)' was deprecated in visionOS 1.0: Use `onChange` with a two or zero parameter action closure instead.

Check warning on line 71 in Sources/Vexillographer/FlagControl/FlagTextField.swift

View workflow job for this annotation

GitHub Actions / visionOS Matrix (26.4, macos-26)

'onChange(of:perform:)' was deprecated in visionOS 1.0: Use `onChange` with a two or zero parameter action closure instead.

Check warning on line 71 in Sources/Vexillographer/FlagControl/FlagTextField.swift

View workflow job for this annotation

GitHub Actions / visionOS Matrix (26.4, macos-26)

'onChange(of:perform:)' was deprecated in visionOS 1.0: Use `onChange` with a two or zero parameter action closure instead.
guard let newText else {
return
}
cachedText = editingFormat(newText)
}
.onChange(of: isFocused) { isFocused in

Check warning on line 77 in Sources/Vexillographer/FlagControl/FlagTextField.swift

View workflow job for this annotation

GitHub Actions / visionOS Matrix (26.2, macos-26)

'onChange(of:perform:)' was deprecated in visionOS 1.0: Use `onChange` with a two or zero parameter action closure instead.

Check warning on line 77 in Sources/Vexillographer/FlagControl/FlagTextField.swift

View workflow job for this annotation

GitHub Actions / visionOS Matrix (26.2, macos-26)

'onChange(of:perform:)' was deprecated in visionOS 1.0: Use `onChange` with a two or zero parameter action closure instead.

Check warning on line 77 in Sources/Vexillographer/FlagControl/FlagTextField.swift

View workflow job for this annotation

GitHub Actions / visionOS Matrix (26.3, macos-26)

'onChange(of:perform:)' was deprecated in visionOS 1.0: Use `onChange` with a two or zero parameter action closure instead.

Check warning on line 77 in Sources/Vexillographer/FlagControl/FlagTextField.swift

View workflow job for this annotation

GitHub Actions / visionOS Matrix (26.3, macos-26)

'onChange(of:perform:)' was deprecated in visionOS 1.0: Use `onChange` with a two or zero parameter action closure instead.

Check warning on line 77 in Sources/Vexillographer/FlagControl/FlagTextField.swift

View workflow job for this annotation

GitHub Actions / visionOS Matrix (26.4, macos-26)

'onChange(of:perform:)' was deprecated in visionOS 1.0: Use `onChange` with a two or zero parameter action closure instead.

Check warning on line 77 in Sources/Vexillographer/FlagControl/FlagTextField.swift

View workflow job for this annotation

GitHub Actions / visionOS Matrix (26.4, macos-26)

'onChange(of:perform:)' was deprecated in visionOS 1.0: Use `onChange` with a two or zero parameter action closure instead.
guard isFocused == false, let cachedText else {
return
}
Expand Down
Loading