mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-20 12:29:55 +08:00
fix(angular): null values are not converted to falsy value (#26341)
BREAKING CHANGE: Datetime: Passing the empty string to the `value` property will now error as it is not a valid ISO-8601 value. Angular: `null` values on form components will no longer be converted to the empty string (`''`) or `false`. This impacts `ion-checkbox`, `ion-datetime`, `ion-input`, `ion-radio`, `ion-radio-group`, ion-range`, `ion-searchbar`, `ion-segment`, `ion-select`, `ion-textarea`, and `ion-toggle`.
This commit is contained in:
@ -160,8 +160,7 @@ export class DatetimeButton implements ComponentInterface {
|
||||
* to keep checking if the datetime value is `string` or `string[]`.
|
||||
*/
|
||||
private getParsedDateValues = (value?: string[] | string | null): string[] => {
|
||||
// TODO FW-2646 Remove value === ''
|
||||
if (value === '' || value === undefined || value === null) {
|
||||
if (value === undefined || value === null) {
|
||||
return [];
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user