@onekeyfe/react-native-native-list 3.0.171 → 3.0.173

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -12,6 +12,26 @@ final class NativeListAccessoryButton: UIButton {
12
12
  }
13
13
  }
14
14
 
15
+ // A `.system` button cross-fades its title on every change. Rebinding a row
16
+ // or section header sets the title again, so a selector header value such as
17
+ // "$15.60" faded out and back in on each checkbox toggle (OK-64148). Data
18
+ // binding is not an animation: commit title changes immediately. UIKit
19
+ // applies a changed title in a later layout pass of the button, so
20
+ // layoutSubviews below runs without animation as well.
21
+ override func setTitle(_ title: String?, for state: UIControl.State) {
22
+ UIView.performWithoutAnimation {
23
+ super.setTitle(title, for: state)
24
+ layoutIfNeeded()
25
+ }
26
+ }
27
+
28
+ override func setAttributedTitle(_ title: NSAttributedString?, for state: UIControl.State) {
29
+ UIView.performWithoutAnimation {
30
+ super.setAttributedTitle(title, for: state)
31
+ layoutIfNeeded()
32
+ }
33
+ }
34
+
15
35
  var selectorSummaryLineHeight: CGFloat? {
16
36
  didSet {
17
37
  invalidateIntrinsicContentSize()
@@ -45,7 +65,9 @@ final class NativeListAccessoryButton: UIButton {
45
65
  }
46
66
 
47
67
  override func layoutSubviews() {
48
- super.layoutSubviews()
68
+ UIView.performWithoutAnimation {
69
+ super.layoutSubviews()
70
+ }
49
71
  defer {
50
72
  if let titleLabel {
51
73
  var frame = titleLabel.frame
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onekeyfe/react-native-native-list",
3
- "version": "3.0.171",
3
+ "version": "3.0.173",
4
4
  "description": "Template-driven native RecyclerView and UICollectionView for React Native",
5
5
  "source": "./src/index.ts",
6
6
  "main": "./lib/module/index.js",
@@ -87,8 +87,8 @@
87
87
  "typescript": "^5.9.2"
88
88
  },
89
89
  "peerDependencies": {
90
- "@onekeyfe/react-native-image": "3.0.171",
91
- "@onekeyfe/react-native-native-logger": "3.0.171",
90
+ "@onekeyfe/react-native-image": "3.0.173",
91
+ "@onekeyfe/react-native-native-logger": "3.0.173",
92
92
  "react": "*",
93
93
  "react-native": "*",
94
94
  "react-native-nitro-modules": "0.37.0"