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

feat(Lucene): create contentType multi select for admin ui #36

Merged
merged 2 commits into from
Mar 28, 2024

Conversation

bkapustik
Copy link
Collaborator

Motivation

Create multi-select for Content Types in Admin UI used to select content types for a specific path used for indexing

Checklist

  • Code follows coding conventions held in this repo
  • Automated tests have been added
  • Tests are passing
  • Docs have been updated (if applicable)
  • Temporary settings (e.g. variables used during development and testing) have been reverted to defaults

@fialafilip fialafilip merged commit 7688f7b into main Mar 28, 2024
2 checks passed
import { IoCheckmarkSharp } from 'react-icons/io5';
import { MdOutlineCancel } from 'react-icons/md';
import { RxCross1 } from 'react-icons/rx';
import Select, { type ActionMeta, type ClearIndicatorProps, components, type CSSObjectWithLabel, type GroupBase, type MultiValue, type MultiValueRemoveProps, type OptionProps, type StylesConfig } from 'react-select'; // eslint-disable-line sort-imports
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't need to disable the eslint rule here, just fix the order of imported types.

</Stack>
);
const customStyle: StylesConfig<OptionType, true, GroupBase<OptionType>> = {
control: (styles, { isFocused }) => ({ // eslint-disable-line @typescript-eslint/consistent-type-assertions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In this case it would make a sense to disable consistent-type-assertions for the whole customStyle block with

/* eslint-disable @typescript-eslint/naming-convention */
..... block code ....
/* eslint-enable @typescript-eslint/naming-convention */ 

<div className="label-wrapper___AcszK">
<label className="label___WET63">Included content types</label>
</div>
<Select<OptionType, true>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it necessary to explicitly define generic types here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants