adminjs
adminjs copied to clipboard
Multi select dropdown for filters
Describe the problem feature solves Right now you can only select a single value to filter for in dropdowns.
Describe the solution you'd like It would be good to be able to select multiple values.
Describe alternatives you've considered Might be a duplicate of #438 ... ?
Acceptance criteria Being able to select multiple values in filter dropdowns, and being able to filter by those.
Now:
Enhancement:
I would like to work on this issue.
@Hat52 Awesome, go one and create the Pull Request 🚀 . If you need any help drop me a message on Slack, or comment here.
@krzysztofstudniarek Do i need to fork the dev repo?
@Hat52 I believe you'll need to fork adminjs
and adminjs-desig-system
repositories. But @dziraf might have more insights here 😄
@krzysztofstudniarek why do I need to fork two repositories?
@Hat52 @krzysztofstudniarek not sure if forking adminjs-design-system
will be required as it's possible it's already got required UI components. You might have to fork adapter's repositories, e. g. adminjs-typeorm
so that it supports array filters.
@dziraf do I need to configure both repo on my local to achive the desired result.
mkdir adminjs-development
cd adminjs-development
git clone [email protected]:SoftwareBrothers/adminjs.git
cd adminjs
yarn install
yarn link
yarn dev
yarn bundle:globals
cd ..
git clone [email protected]:SoftwareBrothers/adminjs-typeorm.git
cd adminjs-typeorm
yarn install
yarn link
yarn dev
cd ..
mkdir adminjs-test-app # or clone e. g. adminjs-example-app repository
cd adminjs-test-app
yarn init # setup test app project if you're going to work on your own test app
yarn link "adminjs"
yarn link "@adminjs/typeorm"
the steps above should make you see your local changes in your test app
you should clone your forked repositories though
@dziraf thanks🙂
@tomtastico can you share the step to reach to the filter that you mentioned?
@Hat52 thanks for looking into this!
You can get this kind of filter by having a resource using a mongoose schema that has a property of type enum, something like this:
@Prop({
type: String,
enum: StatusEnum,
})
status: StatusEnum;
With the enum being something like:
enum StatusEnum {
VERIFIED = 'verified',
VERIFYING = 'verifying',
UNVERIFIED = 'unverified',
BLOCKED = 'blocked',
}
@dziraf How do I run the test app. I have linked it with adminjs and the @adminjs/typeorm.
this is how my project structure look for now
This issue is a part of https://github.com/SoftwareBrothers/adminjs/issues/251, hence I'm closing it and move conversation there.