How to use the @uform/react.createControllerBox function in @uform/react

To help you get started, we’ve selected a few @uform/react examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github alibaba / uform / packages / next / src / components / layout.tsx View on Github external
}
  )`
    margin-bottom: 0px;
    .next-card-body {
      padding-top: 20px;
      padding-bottom: 0 !important;
    }
    &.next-card {
      border: none;
      padding: 0 15px;
      padding-bottom: 15px;
    }
  `
)

export const FormTextBox = createControllerBox(
  'text-box',
  styled(({ children, schema, className }) => {
    const { title, help, text, name, extra, ...props } = schema['x-props']
    const ref: React.RefObject = useRef()
    const arrChildren = toArr(children)
    const split = String(text).split('%s')
    let index = 0
    useLayoutEffect(() => {
      if (ref.current) {
        const elements = ref.current.querySelectorAll('.text-box-field')
        const syncLayouts = Array.prototype.map.call(
          elements,
          (el: HTMLElement) => {
            return [
              el,
              () => {
github alibaba / uform / packages / antd / src / components / layout.tsx View on Github external
padding-bottom: 15px;
      display: block;
      box-shadow: none;
    }
    .ant-card-head {
      padding: 0 !important;
      min-height: 24px;
      font-weight: normal;
    }
    .ant-card-head-title {
      padding: 0;
    }
  `
)

export const FormTextBox = createControllerBox(
  'text-box',
  styled(({ children, schema, className }) => {
    const { title, help, text, name, extra, ...props } = schema['x-props']
    const ref: React.RefObject = useRef()
    const arrChildren = toArr(children)
    const split = String(text).split('%s')
    useLayoutEffect(() => {
      if (ref.current) {
        const elements = ref.current.querySelectorAll('.text-box-field')
        const syncLayouts = Array.prototype.map.call(
          elements,
          (el: HTMLElement) => {
            return [
              el,
              () => {
                const ctrl = el.querySelector(

@uform/react

English | [简体中文](./README.zh-cn.md)

MIT
Latest version published 4 years ago

Package Health Score

62 / 100
Full package analysis

Similar packages