Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: schemaSettingDefaultValue support expression #4294

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

katherinehhh
Copy link
Contributor

Description

Motivation

Key changes

  • Frontend
  • Backend

Test plan

Suggestions

Underlying risk

Showcase

Copy link

height bot commented May 8, 2024

This pull request has been linked to 1 task:

💡Tip: Add "Close T-4232" to the pull request title or description, to a commit message, or in a comment to mark this task as "Done" when the pull request is merged.

const inputRef = useRef<HTMLDivElement>(null);
const [options, setOptions] = useState([]);
const form = useForm();
const keyLabelMap = useMemo(() => createOptionsValueLabelMap(options), [options]);
const [ime, setIME] = useState<boolean>(false);
const [changed, setChanged] = useState(false);
const [hasVariable, setHasVariable] = useState(value.includes('$'));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

在这里判断可能影响的范围比较广,推荐在 VariableInput 组件中判断

* @param props
* @returns
*/
export const VariableInput = (props: Props) => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

感觉不复制一份,在原来的基础上修改就可以,这样也可以防止冗余代码

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants