Skip to content
Open
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 @@ -6,6 +6,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),

## [Unreleased]

- We fixed an issue where the `background-gradient-native` widget would not render correctly with the new RN architecture upgrade.

## [2.2.0] - 2025-7-7

- Updated react-native-linear-gradient to latest version.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "background-gradient-native",
"widgetName": "BackgroundGradient",
"version": "2.2.0",
"version": "2.2.1",
"repository": {
"type": "git",
"url": "https://github.com/mendix/native-widgets.git"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ReactElement } from "react";
import { Pressable, NativeModules, Alert } from "react-native";
import { Pressable, Alert } from "react-native";
import LinearGradient from "react-native-linear-gradient";
import { all } from "deepmerge";
import { executeAction } from "@mendix/piw-utils-internal";
Expand Down Expand Up @@ -36,8 +36,16 @@ const angleValidation = (angle: number | undefined): number => {
};

export function BackgroundGradient({ name, colorList, content, onClick, style }: props): ReactElement {
if (!("BVLinearGradient" in NativeModules.UIManager)) {
Alert.alert("", "The widget 'Background gradient' requires an updated 'Make It Native 9' application");
if (!LinearGradient) {
Alert.alert(
"Background Gradient Not Available",
"This device does not support the background gradient feature.\n\n" +
"Possible reasons:\n" +
"• The app binary does not include native gradient support (older app version).\n" +
"• The native library wasn’t linked or rebuilt before installation.\n" +
"• The current OS/platform does not support this feature.\n\n" +
"Please update the app to the latest version or check that the required native modules are built into this release."
);
}

const styles = all<CustomStyle>([defaultStyle, ...style]);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<package xmlns="http://www.mendix.com/package/1.0/">
<clientModule name="BackgroundGradient" version="2.2.0" xmlns="http://www.mendix.com/clientModule/1.0/">
<clientModule name="BackgroundGradient" version="2.2.1" xmlns="http://www.mendix.com/clientModule/1.0/">
<widgetFiles>
<widgetFile path="BackgroundGradient.xml" />
</widgetFiles>
Expand Down
Loading