-
-
Notifications
You must be signed in to change notification settings - Fork 9.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[release-2.19] fix: formkit select component not emitting event or up…
…dating selection on value change (#6610) This is an automated cherry-pick of #6602 /assign LIlGG ```release-note 解决 Formkit Select 组件在值变更时不会发出事件及修改选项值的问题。 ```
- Loading branch information
Showing
3 changed files
with
53 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
export const isFalse = (value: string | boolean | undefined | null) => { | ||
// eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
export const isFalse = (value: any, onlyBoolean = false) => { | ||
if (onlyBoolean) { | ||
return [false, "false"].includes(value); | ||
} | ||
return [undefined, null, "false", false].includes(value); | ||
}; |