Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Number Input #281

Open
xgatic opened this issue Jul 31, 2024 · 1 comment
Open

Number Input #281

xgatic opened this issue Jul 31, 2024 · 1 comment

Comments

@xgatic
Copy link

xgatic commented Jul 31, 2024

A number input would be great to support admin interfaces handling lot of data and numbers. Basically the same as a text input, just with arrows on the right side additionally (keyboard support, etc.)

Bildschirmfoto 2024-07-31 um 14 34 55
@chrismcv
Copy link

I've forked TextField for this reason. My solution was to add an inputComponent prop that could accept a custom factory to create the control.

	return (
		<div {...attributes} data-rs-aligner-target className={rootClassName}>
			<TextFieldSlot position="start" icon={icon} slot={startSlot} size={size} affix={prefix} />
			{inputComponent ? (
				React.createElement(inputComponent as any, inputProps)
			) : (
				<input {...inputProps} />
			)}

			<TextFieldSlot position="end" icon={endIcon} slot={endSlot} size={size} affix={suffix} />
		</div>
	);
	

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Ideas
Development

No branches or pull requests

3 participants