From 30e3a516abde8948da8f6d80b6d241371ac4a586 Mon Sep 17 00:00:00 2001 From: Avraham Sakal Date: Sat, 23 Nov 2024 22:17:08 -0500 Subject: [PATCH] begin 2024-11-21 journal entry --- src/content/journal-entries/2024-11-21.md | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 src/content/journal-entries/2024-11-21.md diff --git a/src/content/journal-entries/2024-11-21.md b/src/content/journal-entries/2024-11-21.md new file mode 100644 index 0000000..63a4f0d --- /dev/null +++ b/src/content/journal-entries/2024-11-21.md @@ -0,0 +1,8 @@ +--- +title: React-Admin Wrestling, a Little More Elasticsearch +date: 2024-11-21 +--- + +React-admin is a wonderful framework, and is quite flexible; but if you need something that it doesn't offer, it's very difficult to dig through the docs to find out how to do it. + +Today, I needed to add a conditional filter on a List page. The `List` component takes a `filters` prop, which is an Array of `*Input` components. It does not accept a component to act as a wrapper or container around the `*Input`s. The task was to have a "From Official Clipper?" filter (a boolean switch) for the Clips list; and if it's unchecked, the List should then show a "Has Potential?" filter (another boolean switch), defaulting to `false`. If "From Official Clipper?" is checked, then the "Has Potential?" filter should be disabled, because it's assumed clips made official clippers have potential.