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

Autocomplete: allow modification/styling of underlying TextEdit-control #3834

Closed
WolfgangKluge opened this issue May 23, 2022 · 13 comments · Fixed by #5085
Closed

Autocomplete: allow modification/styling of underlying TextEdit-control #3834

WolfgangKluge opened this issue May 23, 2022 · 13 comments · Fixed by #5085
Assignees
Labels
Type: Feature ⚙ Request or idea for a new feature.
Milestone

Comments

@WolfgangKluge
Copy link
Contributor

WolfgangKluge commented May 23, 2022

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)

@WolfgangKluge WolfgangKluge added the Type: Feature ⚙ Request or idea for a new feature. label May 23, 2022
@WolfgangKluge
Copy link
Contributor Author

In FreeTyping-mode, I'd like to set MaxLength, too

@stsrki
Copy link
Collaborator

stsrki commented May 24, 2022

I think some of the parameters would make sense to pass onto the TextEdit. Like Class and Style. With the prefix Search.

  • SearchClass
  • SearchStyle

Or do you have a better naming in mind?

@WolfgangKluge
Copy link
Contributor Author

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)..

@stsrki
Copy link
Collaborator

stsrki commented May 24, 2022

It's difficult to know to which subcomponent the parameter should be applied. That's why it is better to have them explicitly defined.

@WolfgangKluge
Copy link
Contributor Author

WolfgangKluge commented May 24, 2022

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.

@David-Moreira
Copy link
Contributor

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.

@stsrki
Copy link
Collaborator

stsrki commented May 25, 2022

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.

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.

@David-Moreira
Copy link
Contributor

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.

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.

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.

@NeoCoderMatrix86
Copy link

I would apprecheate this, since I would like to modify styling of the textedit (color, etc.).

@MarcusBullock
Copy link

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.

@MarcusBullock
Copy link

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.

@stsrki
Copy link
Collaborator

stsrki commented Oct 12, 2023

I can confirm it is still possible. We will add it in the 1.4 milestone.

@stsrki stsrki added this to the 1.4 milestone Oct 12, 2023
@stsrki
Copy link
Collaborator

stsrki commented Oct 12, 2023

I think some of the parameters would make sense to pass onto the TextEdit. Like Class and Style. With the prefix Search.

  • SearchClass
  • SearchStyle

Or do you have a better naming in mind?

@steal4life Do it like this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Feature ⚙ Request or idea for a new feature.
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

6 participants