Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Allow, once again, to bind anything that is convertable to NS=>NS

  • Loading branch information...
commit 5ee8231a944818fe9d7a2e884fcc4a06816c9583 1 parent fdce4ea
@nafg nafg authored
Showing with 3 additions and 3 deletions.
  1. +3 −3 core/util/src/main/scala/net/liftweb/util/CssSel.scala
View
6 core/util/src/main/scala/net/liftweb/util/CssSel.scala
@@ -785,8 +785,8 @@ object ComputeTransformRules {
def computeTransform(param: => T, ns: NodeSeq): Seq[NodeSeq] = List(f(param))
}
- implicit def nodeSeqFuncTransform: ComputeTransformRules[NodeSeq => NodeSeq] = new ComputeTransformRules[NodeSeq => NodeSeq] {
- def computeTransform(func: => NodeSeq => NodeSeq, ns: NodeSeq): Seq[NodeSeq] = List(func(ns))
+ implicit def nodeSeqFuncTransform[A](implicit view: A => NodeSeq => NodeSeq): ComputeTransformRules[A] = new ComputeTransformRules[A] {
+ def computeTransform(func: =>A, ns: NodeSeq): Seq[NodeSeq] = List(view(func)(ns))
}
implicit def nodeSeqSeqFuncTransform: ComputeTransformRules[NodeSeq => Seq[Node]] = new ComputeTransformRules[NodeSeq => Seq[Node]] {
@@ -908,4 +908,4 @@ final case class ToCssBindPromoter(stringSelector: Box[String], css: Box[CssSele
* @return the function that will transform an incoming DOM based on the transform rules
*/
def replaceWith[T](it: => T)(implicit computer: ComputeTransformRules[T]): CssSel = this.#>(it)(computer)
-}
+}
Please sign in to comment.
Something went wrong with that request. Please try again.