     let w = leftViewWidth
     v.frame = CGRect(x: 0, y: 0, width: w, height: bounds.height)
     dividerContentEdgeInsets.left = w
+  }
+  /// Layout the rightView.
+  func layoutRightView() {
+    guard let rightView = rightView else {
+      return
+    }
+    
+    let w = CGFloat(rightView.grid.views.count) * bounds.height
+    rightView.frame = CGRect(x: bounds.width - w, y: 0, width: w, height: bounds.height)
+    rightView.grid.reload()
   }
 }
 

      clearIconButton = IconButton(image: Icon.cm.clear, tintColor: placeholderNormalColor)
      clearIconButton!.contentEdgeInsetsPreset = .none
      clearIconButton!.pulseAnimation = .none
      clearButtonMode = .never
      rightViewMode = .whileEditing
      rightView = clearIconButton
      isClearIconButtonAutoHandled = { isClearIconButtonAutoHandled }()
      
      layoutSubviews()

    set(value) {
      guard value else {
        clearIconButton?.removeTarget(self, action: #selector(handleClearIconButton), for: .touchUpInside)
        removeFromRightView(view: clearIconButton)
        clearIconButton = nil
        return
      }
