[Filters] Remove extra margin when rightAction is null
#4134
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
WHY are these changes introduced?
When the
ResourceList
&Filter
components are used in either an empty state configuration, or one where no filters are passed in (i.e. just search viaTextField
), a class with extra right margin is added causing the input to appear misaligned. This can be seen on the "empty state resource list" story/example linked in the docs: https://codesandbox.io/s/uyg6i?module=App.jsCurrently, with margin:
Empty state: Existing web example:This PR proposes:
Empty state:WHAT is this pull request doing?
Sets
rightActionMarkup
inFilters.tsx
tonull
when no filters are passed in, which prevents appending an empty div with the offending classes inConnectedFilterControl
here.How to 馃帺
Either copy paste the following into the Playground example or run through all existing
ResourceList
andFilter
examples.Copy-paste this code in
playground/Playground.tsx
:馃帺 checklist
README.md
with documentation changes