@Singtaa: Please consider leaving a review on the Asset Store if you enjoy using OneJS. It really helps us a lot! And, I promise it'll take less time than debugging your last script.😊 Oh also, OneJS V2 is now out of preview!
Menu

Controls

Referencing VisualElements

The JSX association with UI Toolkit VisualElement controls is in the 'jsx.d.ts' file in ScriptLib\definitions

To access the VisualElement, create a 'ref' reference to the Element, then typecast the ref.current.ve as here.

TYPESCRIPT
const tfref = useRef<Dom>();

function onEvent(){
  const tf = tfref.current.ve as TextField;
  log(tf.text);
}

return <textfield ref={tfref} text="foo" />
  • Button
  • TextElement
  • TextField
  • SimpleList
  • DropdownField
  • [[VirtualList|Example---Control---List---VirtualList]] ...