-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Demo: Add 'FinalFormRangeInput' to handmade 'ProductForm' (#2593)
A `FinalFormRangeInput` field is added to the handmade `ProductForm`. This is done in preparation to add the range input field to the admin generator. A new field has been added to `product.entity` in context to this: `priceRange` ``` @ObjectType() @inputType("ProductPriceRangeInput") export class ProductPriceRange { @field() @IsNumber() min: number; @field() @IsNumber() max: number; } ```
- Loading branch information
1 parent
fb24b79
commit fb7dc52
Showing
6 changed files
with
60 additions
and
2 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
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,7 @@ | ||
import { Migration } from "@mikro-orm/migrations"; | ||
|
||
export class Migration20241004111520 extends Migration { | ||
async up(): Promise<void> { | ||
this.addSql('alter table "Product" add column "priceRange" jsonb null;'); | ||
} | ||
} |
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