mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-29 05:29:37 +08:00
Address diverse users without gender assumption (#22464)
Not all diverse users don't want to be addressed as "lady" - if they wanted to, they'd have put in "lady". This commit fixes this potential offense and replaces it using a less specific "hi there".
This commit is contained in:
parent
fd0038e9e0
commit
3dd2332549
@ -34,9 +34,17 @@ const Demo = () => {
|
||||
const [form] = Form.useForm();
|
||||
|
||||
const onGenderChange = value => {
|
||||
form.setFieldsValue({
|
||||
note: `Hi, ${value === 'male' ? 'man' : 'lady'}!`,
|
||||
});
|
||||
switch (value) {
|
||||
case "male":
|
||||
form.setFieldsValue({ note: "Hi, man!" });
|
||||
return;
|
||||
case "female":
|
||||
form.setFieldsValue({ note: "Hi, lady!" });
|
||||
return;
|
||||
case "other":
|
||||
form.setFieldsValue({ note: "Hi there!" });
|
||||
return;
|
||||
}
|
||||
};
|
||||
|
||||
const onFinish = values => {
|
||||
|
Loading…
Reference in New Issue
Block a user