Skip to content

Releases: mtsgi/kafjs

kaf.js v0.1.2

19 Jun 14:40
3516b0c

Choose a tag to compare

kaf.js v0.1.2 Pre-release
Pre-release

v0.1.2

https://kafjs.netlify.app/

What's new

Support expression in kit:if

The following attributes have been added that can be used within an attribute.

  • == operator

    • By passing a JavaScript expression or kaf data name on the right side, the element will be displayed only if the kaf data and the expression (or value of the kaf data) are equivalent.
    • Example: <div kit:if="name == 'John'"></div>
  • != operator

    • Passing a JavaScript expression or kaf data name on the right side will only display that element if the kaf data and the expression (or value of the kaf data) are not equivalent.
    • Example: <div kit:if="number ! = 0"></div>
  • === operator

    • Passing a JavaScript expression or kaf data name on the right-hand side will only display that element if the kaf data and the expression (or value of the kaf data) are strictly equivalent.
    • Example: <div kit:if="number === 100"></div> (this element is not displayed if the value is a string "100")
  • !== operator

    • Passing a JavaScript expression or kaf data name on the right-hand side will only display that element if the kaf data and the expression (or value of the kaf data) are not strictly equivalent.
    • Example: <div kit:if="password ! == password_confirm"></div> (this element is not displayed when the values of the two KAF data are strictly equivalent)
  • ?? operator

    • Only if the kaf data is not null and undefined will the element be displayed.
    • Example: <p kit:if="mydata.address.pref ??" ></p>
  • && operator

    • Passing a kaf data name on the right-hand side will only display that element if the two kaf data are both values that are truthy.
    • Example: <p kit:if="first_name && last_name"></p>
  • || operator

    • Passing a kaf data name on the right-hand side will display the element if either of the two kaf data is a value that are trythy.
    • Example: <p kit:if="mydata.height || mydata.width"></p>

You can use the kaf-data name that has already been defined by data of kaf-option, and that will be set as initial value of the form.

Support default value

  • Support for optional argument options with data names already defined in kit:bind

kaf.js v0.1.1

02 May 17:17

Choose a tag to compare

kaf.js v0.1.1 Pre-release
Pre-release
  • Support expressions in a kit:if attribute.
  • Add error handling.

https://kafjs.netlify.app/

kaf.js v0.1

22 Apr 10:08
b63112c

Choose a tag to compare

kaf.js v0.1 Pre-release
Pre-release

This is first release of kafjs beta.

https://kafjs.netlify.app/