-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(form): Add a placeholder for Select fields
Currently, there's no placeholder for the `SelectField`. This commit updates `@kaoto-next/uniforms-patternfly` to version `^0.5.7` to be able to import the typings for the `SelectField` component and create a wrapper that sets a default placeholder. fix: #676
- Loading branch information
Showing
8 changed files
with
24 additions
and
16 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
6 changes: 6 additions & 0 deletions
6
packages/ui/src/components/Form/customField/CustomSelectField.tsx
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import { SelectField, SelectFieldProps } from '@kaoto-next/uniforms-patternfly'; | ||
import { FunctionComponent } from 'react'; | ||
|
||
export const CustomSelectField: FunctionComponent<SelectFieldProps> = (props) => { | ||
return <SelectField {...(props as SelectFieldProps)} placeholder="Please select an option..." />; | ||
}; |
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
.../ui/src/components/Form/DisabledField.tsx → ...onents/Form/customField/DisabledField.tsx
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
File renamed without changes.
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