You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

629 B

order title debug
99 [{zh-CN 受控同步模式} {en-US Controlled Synced mode}] true

zh-CN

测试受控模式下两个 Segmented 同步 state。

en-US

Tests two Segmented synchronized states in controlled mode.

import { useState } from 'react';
import { Segmented } from 'antd';

const Demo = () => {
  const [foo, setFoo] = useState('AND');
  return (
    <>
      <Segmented value={foo} options={['AND', 'OR', 'NOT']} onChange={setFoo} />
      &nbsp;&nbsp;
      <Segmented value={foo} options={['AND', 'OR', 'NOT']} onChange={value => setFoo(value)} />
    </>
  );
};

export default Demo;