From d04a78cc62895e59a0f6772d8a26c7f146f83705 Mon Sep 17 00:00:00 2001 From: Antonio17 Date: Wed, 4 Sep 2024 02:38:41 -0700 Subject: [PATCH 1/3] Update React-Admin Version to 4.14.4 (#32) --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index 81e32aa..11ed192 100644 --- a/build.sbt +++ b/build.sbt @@ -32,7 +32,7 @@ val sttp = "3.5.0" val anorm = "2.7.0" val scalaTestPlusPlay = "6.0.0-M6" val scalaTestPlusMockito = "3.2.15.0" -val reactAdmin = "4.14.3" +val reactAdmin = "4.14.4" val consoleDisabledOptions = Seq("-Xfatal-warnings", "-Ywarn-unused", "-Ywarn-unused-import") From 846413319696da3b88acbbc5f86cb1e1bb215d17 Mon Sep 17 00:00:00 2001 From: Antonio17 Date: Wed, 4 Sep 2024 02:43:06 -0700 Subject: [PATCH 2/3] Fixed the filter functionality when the parameter is a reference. (#33) Fixed : Failed prop type: Invalid prop children of type array supplied to `ReferenceFieldView`, expected a single ReactElement. --- .../spra/ui/web/components/ListGuesser.scala | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/spra-web/src/main/scala/net/wiringbits/spra/ui/web/components/ListGuesser.scala b/spra-web/src/main/scala/net/wiringbits/spra/ui/web/components/ListGuesser.scala index eacb477..64fe18d 100644 --- a/spra-web/src/main/scala/net/wiringbits/spra/ui/web/components/ListGuesser.scala +++ b/spra-web/src/main/scala/net/wiringbits/spra/ui/web/components/ListGuesser.scala @@ -20,7 +20,7 @@ object ListGuesser { val component: FunctionalComponent[Props] = FunctionalComponent[Props] { props => val fields = ResponseGuesser.getTypesFromResponse(props.response) - def defaultField(reference: String, source: String)(children: ReactElement*): ReactElement = + def defaultField(reference: String, source: String)(children: ReactElement): ReactElement = ReferenceField(reference = reference, source = source)(children) val widgetFields: Seq[ReactElement] = fields.map { field => @@ -49,7 +49,14 @@ object ListGuesser { case ColumnType.Image => Fragment() case ColumnType.Number => NumberInput(source = field.name) case ColumnType.Reference(reference, source) => - defaultField(reference, field.name)(TextField(source = source)) + ReferenceInput( + source = field.name, + reference = reference + )( + SelectInput( + optionText = props.response.referenceDisplayField.getOrElse(source) + ) + ) } } From 4fc38d13a2225d711658f2b6d6f254c86e344eaa Mon Sep 17 00:00:00 2001 From: Alexis Hernandez Date: Thu, 5 Sep 2024 00:48:37 -0700 Subject: [PATCH 3/3] Update pull_request.yml Let's run the CI workflow on main branch. --- .github/workflows/pull_request.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index 6fb4b82..8496ad3 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -2,9 +2,9 @@ name: Build the app on: push: - branches: [ master ] + branches: [ main ] pull_request: - branches: [ master ] + branches: [ main ] concurrency: # Only run once for latest commit per ref and cancel other (previous) runs. @@ -36,4 +36,4 @@ jobs: run: CI=true sbt +compile - name: Run tests - run: CI=true sbt +test \ No newline at end of file + run: CI=true sbt +test