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

fix(homebrew): Fixed homebrew autocompletes not clearing #401

Merged
merged 1 commit into from
Apr 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ export function MoveCategoryDialogForm(props: MoveCategoryFormDialogProps) {
}}
/>
<Controller
name='description'
name="description"
control={control}
render={({ field }) => (
<MarkdownEditor
Expand All @@ -162,7 +162,7 @@ export function MoveCategoryDialogForm(props: MoveCategoryFormDialogProps) {
<MoveCategoryAutocomplete
label={"Replaces Category"}
value={field.value}
onChange={(ids) => field.onChange(ids)}
onChange={(ids) => field.onChange(ids ?? null)}
onBlur={field.onBlur}
helperText={
"Replaces the category (and all moves within) with this category"
Expand All @@ -177,7 +177,7 @@ export function MoveCategoryDialogForm(props: MoveCategoryFormDialogProps) {
<MoveCategoryAutocomplete
label={"Enhances Category"}
value={field.value}
onChange={(ids) => field.onChange(ids)}
onChange={(ids) => field.onChange(ids ?? null)}
onBlur={field.onBlur}
helperText={
"Adds moves in this category to the entered category"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ export function MoveDialogForm(props: MoveFormDialogProps) {
}}
/>
<Controller
name='text'
name="text"
control={control}
render={({ field }) => (
<MarkdownEditor
Expand All @@ -224,7 +224,7 @@ export function MoveDialogForm(props: MoveFormDialogProps) {
<MoveAutocomplete
label={"Replaces Move"}
value={field.value}
onChange={(ids) => field.onChange(ids)}
onChange={(ids) => field.onChange(ids ?? null)}
onBlur={field.onBlur}
disabled={disabled}
helperText={"Replaces an existing move with this one."}
Expand Down Expand Up @@ -292,7 +292,7 @@ export function MoveDialogForm(props: MoveFormDialogProps) {
<LegacyTrackAutocomplete
multiple
value={field.value}
onChange={(ids) => field.onChange(ids)}
onChange={(ids) => field.onChange(ids ?? [])}
onBlur={field.onBlur}
disabled={disabled}
helperText={"Legacy Tracks you would like to roll against"}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ export function OracleTableRollableAutocomplete(
)}
value={value ?? null}
onChange={(evt, value) => {
console.debug(value);
onChange(value ?? undefined);
}}
onBlur={onBlur}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ export function OracleTablesCollectionDialogForm(
}}
/>
<Controller
name='description'
name="description"
control={control}
render={({ field }) => (
<MarkdownEditor
Expand All @@ -179,7 +179,7 @@ export function OracleTablesCollectionDialogForm(
<OracleCollectionAutocomplete
label={"Replaces Collection"}
value={field.value}
onChange={(ids) => field.onChange(ids)}
onChange={(ids) => field.onChange(ids ?? null)}
onBlur={field.onBlur}
helperText={
"Replaces all oracles within the given collection"
Expand All @@ -194,7 +194,7 @@ export function OracleTablesCollectionDialogForm(
<OracleCollectionAutocomplete
label={"Enhances Collection"}
value={field.value}
onChange={(ids) => field.onChange(ids)}
onChange={(ids) => field.onChange(ids ?? null)}
onBlur={field.onBlur}
helperText={
"Adds oracles in this collection to the entered collection"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ export function OracleTableSimpleForm(props: OracleTableSimpleFormProps) {
}}
/>
<Controller
name='description'
name="description"
control={control}
render={({ field }) => (
<MarkdownEditor
Expand All @@ -178,7 +178,7 @@ export function OracleTableSimpleForm(props: OracleTableSimpleFormProps) {
<OracleTableRollableAutocomplete
label={"Replaces Table"}
value={field.value}
onChange={(ids) => field.onChange(ids)}
onChange={(ids) => field.onChange(ids ?? null)}
onBlur={field.onBlur}
helperText={"Replaces an existing oracle table with this one"}
/>
Expand All @@ -191,7 +191,7 @@ export function OracleTableSimpleForm(props: OracleTableSimpleFormProps) {
disabled={disabled}
control={
<Controller
name='showDetails'
name="showDetails"
control={control}
defaultValue={false}
render={({ field }) => (
Expand Down
Loading