Skip to content

Commit 0991b16

Browse files
committed
fix(textarea): name
1 parent 6f3de1c commit 0991b16

File tree

3 files changed

+3
-1
lines changed

3 files changed

+3
-1
lines changed

packages/forms/src/components/form/BInput.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ const inputValue = inputReturnValueAttr(Astro, bind);
3737
3838
const allProps = { ...props, ...inputValue, ...componentProps, pattern: pattern?.toString(), ...castProps };
3939
allProps.name = bindCounter + allProps.name;
40-
4140
addOnSubmitClickEvent(onSubmitClick, allProps);
41+
4242
webFormsSettings.haveFileUpload ||= allProps.type === 'file';
4343
4444
const Component = asComponent as any;

packages/forms/src/components/form/BSelect.astro

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ export interface Props<T extends keyof JSX.IntrinsicElements | React.JSXElementC
1717
const { bind, method, onSubmitClickGlobal, bindCounter = '' } = getContext(Astro, '@astro-utils/forms');
1818
1919
const { as: asComponent = 'select', value: _, props: componentProps, onSubmitClick = onSubmitClickGlobal, ...props } = Astro.props;
20+
props.name = bindCounter + props.name;
2021
addOnSubmitClickEvent(onSubmitClick, props);
2122
2223
let stringifySelectdOptions = getSelectValueFromBind(bind, Astro);

packages/forms/src/components/form/BTextarea.astro

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ if (!Astro.props.disabled && method === 'POST' && await validateFrom(Astro)) {
2626
}
2727
2828
const {as: asComponent = 'textarea', props: componentProps, value: defaultValue, onSubmitClick = onSubmitClickGlobal, ...props} = Astro.props;
29+
props.name = bindCounter + props.name;
2930
addOnSubmitClickEvent(onSubmitClick, props);
3031
3132
const value = getProperty(bind, Astro.props.name, await Astro.slots.render('default') ?? defaultValue);

0 commit comments

Comments
 (0)