BlackBearFTW
Explore posts from serversRRefine
•Created by fair-rose on 11/21/2024 in #ask-any-question
nextjs client side only
@kapa.ai is there a next pages example
14 replies
RRefine
•Created by optimistic-gold on 11/21/2024 in #ask-any-question
nextjs client side only
@kapa.ai what about authentication?
14 replies
RRefine
•Created by rising-crimson on 10/18/2024 in #ask-any-question
do not reset fields on submit
because kapa is making stuff up
12 replies
RRefine
•Created by foreign-sapphire on 10/18/2024 in #ask-any-question
do not reset fields on submit
is this actually possible
12 replies
RRefine
•Created by sensitive-blue on 10/18/2024 in #ask-any-question
do not reset fields on submit
@contributor
12 replies
RRefine
•Created by other-emerald on 10/18/2024 in #ask-any-question
do not reset fields on submit
bruh
12 replies
RRefine
•Created by metropolitan-bronze on 10/18/2024 in #ask-any-question
do not reset fields on submit
@kapa.ai I am making use of const {mutate: register} = useRegister();
12 replies
RRefine
•Created by wise-white on 10/9/2024 in #ask-any-question
Make sure toggle is enabled if edit has a value
@kapa.ai I would like to enable this toggle (as default value) if the form already has a value for the startDate or endData field
<Row>
<Col span={2}>
<Form.Item name="bidWindowToggle"
valuePropName="checked"
label={t("buildings.fields.offerSettings.bidWindowToggle", "Bid Window")}
>
<Switch />
</Form.Item>
</Col>
<Col span={22}>
<Form.Item
noStyle
shouldUpdate={(prevValues, currentValues) => {
// Check if the toggle has changed
if (prevValues.bidWindowToggle !== currentValues.bidWindowToggle) {
// If toggled off, set startDate and endDate to null
if (!currentValues.bidWindowToggle) {
form.setFieldsValue({
offerSettings: {
startDate: null,
endDate: null,
}
});
}
return true; // Return true to trigger a re-render
}
return false; // No update needed
}}
>
{({ getFieldValue }) =>
getFieldValue('bidWindowToggle') === true ? (
<Form.Item
8 replies