Open xgatic opened 1 month ago
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>
);
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.)