Closed florian-lefebvre closed 1 year ago
Hmm good point, yeah right now it just looks for //
so would need to change it.
Wondering what a good symbol would be that would be less likely to have conflicts
It could be useful to make it configurable in the options of createTsForm https://github.com/iway1/react-ts-form/blob/main/src/createSchemaForm.tsx#L163
yeah good idea that way it wouldn't be a breaking change too
But I think changing the default one would be useful, urls are often used as placeholder
good point, we'll change the default. What about --
as the separator? Seems pretty unlikely to have conflicts
gonna have to be in v2 since it's breaking though
LGTM
I ran into this problem as well
I think the default could stay as it is if it checks for ' // '
instead of '//'
Since in the URL it won't be surrounded by spaces
And by doing so it woudn't be a breaking change
Yeah sounds great! And to prevent errors we could do
const [label, ...rest] = describe.split(' // ')
const placeholder = rest.join(' // ')
Version Number
^1.0.10
Codesandbox/Expo snack
No response
Steps to reproduce
Expected behaviour
The placeholder should be
https://google.com
but it's onlyhttps:
. I guess this is because the separator is//
and so the label issegments[0]
and the placeholdersegments[1]
.Relevant log output
No response