Tag
and BelongsTo::filterable()
does not respects Relatable Query and relatableQueryUsing()
#5097
Replies: 4 comments 4 replies
-
Marking this as feature request since |
Beta Was this translation helpful? Give feedback.
4 replies
This comment was marked as off-topic.
This comment was marked as off-topic.
-
Do we have any update on this? Or is there any workaround to make the Tag field respect a relatable query? |
Beta Was this translation helpful? Give feedback.
0 replies
-
Released with Laravel Nova 5.0.0 Feel free to open up a new issue if you're still experiencing this problem on the latest version. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Description:
List of
<select>
options for aBelongsTo
field when usingfilterable()
does not respectrelatableQueryUsing()
Detailed steps to reproduce the issue on a fresh Nova installation:
Two database tables:
categories
:id
(id),level
(tinyint),name
(string)products
:id
(id),category_1_id
(foreignId),category_2_id
(foreignId),name
(string)A product
belongsTo
a primary category and a secondary category, determined by thelevel
attribute in the categories table.App/Nova/Product
:When viewing the
Product
resource list, the filter is created, but it contains all possible categories, not just those limited by therelatableQueryUsing()
callback.While
filterable()
has a callback option for modifying a query, that query is for the results of the filter, not the options presented as a part of the filter.Beta Was this translation helpful? Give feedback.
All reactions