Skip to content

fix: Move picker search props into shared models dialog mixin#8054

Merged
distantnative merged 1 commit intodevelop-patchfrom
fix/8053-picker-search-prop
Apr 10, 2026
Merged

fix: Move picker search props into shared models dialog mixin#8054
distantnative merged 1 commit intodevelop-patchfrom
fix/8053-picker-search-prop

Conversation

@afbora
Copy link
Copy Markdown
Member

@afbora afbora commented Mar 29, 2026

Description

This fixes search: false for picker fields like files, pages, and users.

The problem was that the search prop got lost in the wrapper dialogs before it reached the shared models dialog. I fixed it by moving the Search mixin into the shared props export in ModelsDialog.vue, so the wrapper dialogs receive it as well.

Changelog

🐛 Bug fixes

Docs

For review team

  • Add lab and/or sandbox examples (wherever helpful)
  • Add changes & docs to release notes draft in Notion

@afbora afbora requested a review from a team March 29, 2026 13:19
@afbora afbora self-assigned this Mar 29, 2026
@afbora afbora linked an issue Mar 29, 2026 that may be closed by this pull request
@distantnative
Copy link
Copy Markdown
Member

@afbora lookjbg at your changes it looks to me like we could add it centrally to ModelDialogProps instead three times individually?

@afbora
Copy link
Copy Markdown
Member Author

afbora commented Mar 29, 2026

import { props as ModelsDialogProps } from "./ModelsDialog.vue";

import Dialog from "@/mixins/dialog.js";
import Search from "@/mixins/search.js";
export const props = {
props: {
endpoint: String,
empty: Object,
fetchParams: Object,
item: {
type: Function,
default: (item) => item
},
max: Number,
multiple: {
type: Boolean,
default: true
},
size: {
type: String,
default: "medium"
},
value: {
type: Array,
default: () => []
}
}
};
export default {
mixins: [Dialog, Search, props],

@distantnative ModelsDialogProps is imported from ModelsDialog.vue, but it only includes the exported props object, not the component’s full mixin chain. So even though ModelsDialog itself uses the Search mixin, those props are not available on the wrapper dialogs through ModelsDialogProps.

That’s why I added the definitions in the three wrapper dialogs for now. The cleaner alternative would be to move the relevant search props directly into the shared props export in ModelsDialog.vue, so they are handled centrally there.

What do you think?

@distantnative
Copy link
Copy Markdown
Member

@afbora you should be able to add the search mixin to const props in ModelsDialog.

@afbora
Copy link
Copy Markdown
Member Author

afbora commented Mar 30, 2026

@distantnative Oh, that’s interesting. I assumed that since search mixin was already included in the default export, adding it again to the shared props constant wouldn’t make a difference. Should search mixin stay in the default export as well, or is adding it only to that shared props constant enough?

@afbora afbora force-pushed the fix/8053-picker-search-prop branch from e859f71 to 84209e6 Compare April 1, 2026 13:16
@afbora afbora changed the title fix: Forward search prop in picker dialog wrappers fix: Move picker search props into shared models dialog mixin Apr 1, 2026
@afbora
Copy link
Copy Markdown
Member Author

afbora commented Apr 1, 2026

Now I've implemented @distantnative suggestion. Now ready to review @getkirby/frontend

@afbora afbora requested a review from distantnative April 9, 2026 09:08
@distantnative
Copy link
Copy Markdown
Member

@afbora Could you please add a test case for files, pages and users field in the sandbox blueprints?

@afbora
Copy link
Copy Markdown
Member Author

afbora commented Apr 9, 2026

@distantnative Done via getkirby/sandbox#28

@distantnative
Copy link
Copy Markdown
Member

Thank you, works for me

@distantnative distantnative merged commit 481cd25 into develop-patch Apr 10, 2026
4 checks passed
@distantnative distantnative deleted the fix/8053-picker-search-prop branch April 10, 2026 08:48
@distantnative distantnative added this to the 5.3.4 milestone Apr 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Fieldtype files: setting search to false does not hide search

2 participants