BlackBearFTW
Explore posts from serversRRefine
•Created by national-gold 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 harsh-harlequin on 10/18/2024 in #ask-any-question
do not reset fields on submit
is this actually possible
12 replies
RRefine
•Created by extended-salmon on 10/18/2024 in #ask-any-question
do not reset fields on submit
@contributor
12 replies
RRefine
•Created by fascinating-indigo on 10/18/2024 in #ask-any-question
do not reset fields on submit
bruh
12 replies
RRefine
•Created by wise-white 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 hilarious-sapphire 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
RRefine
•Created by ambitious-aqua on 8/30/2024 in #ask-any-question
create modal to show
@kapa.ai is there a way to do it without a separate state for the record?
20 replies
RRefine
•Created by extended-salmon on 8/30/2024 in #ask-any-question
create modal to show
@kapa.ai does this work in on a per list item? I want to show the details in a modal instead of on a separate page
20 replies
RRefine
•Created by fair-rose on 8/30/2024 in #ask-any-question
create modal to show
@kapa.ai please do it with antd design
20 replies