-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(forms): show error when entered
Field.Currency
or `Field.Number…
…` value exceeds maximum possible amount (#3821) This changes the behaviour added in [this PR](#3184) which again is based on [this issue](#3124). --------- Co-authored-by: Joakim Bjerknes <joakbjerk@gmail.com>
- Loading branch information
1 parent
e43ad59
commit e9cdd68
Showing
5 changed files
with
59 additions
and
34 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
21 changes: 21 additions & 0 deletions
21
packages/dnb-eufemia/src/extensions/forms/Field/Currency/CurrencyDocs.ts
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,21 @@ | ||
import { PropertiesTableProps } from '../../../../shared/types' | ||
import { numberProperties } from '../Number/NumberDocs' | ||
|
||
export const currencyProperties: PropertiesTableProps = { | ||
currency: { | ||
doc: 'Defines what format to show the currency value in I.e `NOK` or `USD`.', | ||
type: 'string', | ||
status: 'optional', | ||
}, | ||
currencyDisplay: { | ||
doc: 'Defined the currency display style. Defaults to `code`.', | ||
type: ['code', 'symbol', 'narrowSymbol', 'name'], | ||
status: 'optional', | ||
}, | ||
help: { | ||
doc: 'Provide a help button. Object consisting of `title` and `content`.', | ||
type: 'object', | ||
status: 'optional', | ||
}, | ||
...numberProperties, | ||
} |
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