-
-
Notifications
You must be signed in to change notification settings - Fork 47
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
Pass object of classes through Select-like fields to Field instances #419
Pass object of classes through Select-like fields to Field instances #419
Conversation
🦋 Changeset detectedLatest commit: 90f9c8f The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Thanks @brandonmcconnell. I couldn't spot any regressions. I know in #155 and #245 there was some difficulty, but I think this approach handles it. If you get a minute, could you read through those and see if there is something I'm overlooking. I'm going to go ahead and merge and release as I couldn't spot any regressions. Thanks! |
@brandonmcconnell Actually, the classes order should be (see docs):
Is there a reason you changed the order here? |
@techniq Ah, I mistakenly thought that the |
PR opened: #421 |
This PR does a few things
adds a function
normalizeClasses
to normalize classes when they can be a string or an object, essentially converting strings to objects (e.g.'p-2'
➞{ root: 'p-2' }
)adds a function
clsMerge
for merging groups of classes without property-by-property consolidationpasses the
classes
objects down to theTextField
component from theSelect
andMultiSelect
componentsfixes a TypeError caused by a faulty ReturnType from
entries()
and removes a related@ts-expect-error