is there fieldOptions constructor?
i'm trying to extract these field validator
but i'm loosing the types of the available parameters the properties are expected to have
how do you guys deal with this? I'd rather not define them all in the parent form's
formOptions where there exists a constructor for.7 Replies
foreign-sapphire•2mo ago
not yet, but feel free to open a feature request issue on GH
just to clarify, you‘d want to have it accessible in the logic section of a component, right?
yappiest-sapphireOP•2mo ago
i think so, all i care about is being able to extract this validator to where i still have access to the types of the properties and parameters of the functions so i can reuse it in other Fields
foreign-sapphire•2mo ago
the main issue is that
fieldOptions would need to know two things: the expected formOptions and the field.name.
it'd be easier inside the component since we can make a helper function of sorts. It would drastically reduce the syntax.
let me check if I have the proposal still somewhere
would that work @bregue dhue ?yappiest-sapphireOP•2mo ago
yes, is this a feature that's available now?
foreign-sapphire•2mo ago
no, I haven't gotten around to do it yet. It's merely a thought on how it could look in the end
we also don't have an open request for it as far as I know
yappiest-sapphireOP•2mo ago
i'll do a feature request like you suggested, i just have to get to work soon,
foreign-sapphire•2mo ago
take your time! I have plenty on my backlog 👍