We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c24510b commit 4c48241Copy full SHA for 4c48241
src/zoid/card-fields/component.jsx
@@ -216,6 +216,15 @@ export const getCardFieldsComponent: () => CardFieldsComponent = memoize(
216
},
217
218
219
+ eligible: ({ props }) => {
220
+ // Prevent child field from being eligible if parent is not eligible
221
+ // Parent props will be empty as eligibility is checked before props are set
222
+ if (Object.keys(props.parent.props).length === 0) {
223
+ return { eligible: false };
224
+ }
225
+ return { eligible: true };
226
+ },
227
+
228
props: {
229
type: {
230
type: "string",
0 commit comments