Autocomplete: allow modification/styling of underlying TextEdit-control
Is your feature request related to a problem? Please describe.
I want to set some properties on the underlying control but there's no direct access to it.
E.g. I want to set Plaintext (or the class name form-control-plaintext) to the autocomplete control.
Describe the solution you'd like At least, one should be able to add css class names to the TextEdit-control.. (I can't think of a clean solution, but full control over the template would be even better - and that's true for really every control)
In FreeTyping-mode, I'd like to set MaxLength, too
I think some of the parameters would make sense to pass onto the TextEdit. Like Class and Style. With the prefix Search.
SearchClassSearchStyle
Or do you have a better naming in mind?
Not really. Ideally, there's a generalized way to modify all the properties of all the inner controls (not only the ones for that are variables passed through). Not sure if it's worth it - but would be great :)
In that special case I'd like to change the TextRole, too (so now 3 properties to pass through - or two and I handle that with class or style)..
It's difficult to know to which subcomponent the parameter should be applied. That's why it is better to have them explicitly defined.
Yeah, but having every (more or less useful) part customizable would't be feasible, too. So I have to hope that you will extend it the way I need.
It's difficult to know to which subcomponent the parameter should be applied. That's why it is better to have them explicitly defined.
We did do an options based api on the ModalProvider, which you were thinking in making it more generic somehow, maybe we can figure out a way to do this component options api that bubbles down to the simpler component when we're talking about a composite components like Autocomplete, instead of having to duplicate every single parameter we want to bubble down.
It's difficult to know to which subcomponent the parameter should be applied. That's why it is better to have them explicitly defined.
We did do an options based api on the
ModalProvider, which you were thinking in making it more generic somehow, maybe we can figure out a way to do this component options api that bubbles down to the simpler component when we're talking about a composite components likeAutocomplete, instead of having to duplicate every single parameter we want to bubble down.
That's a different use case. And the additional options would be defined through the single options parameter. But we would still need to manually define every possible attribute.
It's difficult to know to which subcomponent the parameter should be applied. That's why it is better to have them explicitly defined.
We did do an options based api on the
ModalProvider, which you were thinking in making it more generic somehow, maybe we can figure out a way to do this component options api that bubbles down to the simpler component when we're talking about a composite components likeAutocomplete, instead of having to duplicate every single parameter we want to bubble down.That's a different use case. And the additional options would be defined through the single
optionsparameter. But we would still need to manually define every possible attribute.
Not exaclty a different use case, I mean smthg like this. BaseOptions : Every base component parameter options TextEditOptions : BaseOptions Every textEdit specific options
And then you could just use TextEditOptions on every composite component that uses TextEdit, maybe even with some kind of smart helper that'd just to all that mapping.
But yes, most implementations will require manual mapping I guess. But we can always borrow source generators for creating most of the repetitive stuff I guess.
Or I'm sure we can think of other ways with some kind of fluent mapping options, etc
In theory this wouldn't be so bad, need to find an elegant way to implement this or something similar.
I would apprecheate this, since I would like to modify styling of the textedit (color, etc.).
I agree, I am using the AutoComplete styling but the font size is locked to that defined by the Bootstrap class form-control, whereas I need to change mine to be consistent with the rest of the form I am using it on.
Please can we get a parameter for styling the Input component that this wraps. A property called InputStyle would be fine.
is there any update on this please?
there is currently no way to customise font size on the Autocomplete form unless I am missing something.
I can confirm it is still possible. We will add it in the 1.4 milestone.
I think some of the parameters would make sense to pass onto the TextEdit. Like Class and Style. With the prefix
Search.
SearchClassSearchStyleOr do you have a better naming in mind?
@steal4life Do it like this.