twill icon indicating copy to clipboard operation
twill copied to clipboard

Endpoint params not implemented in Browser form field

Open zachgarwood opened this issue 9 months ago • 0 comments

Description

The documentation for the Browser form field (https://twillcms.com/docs/form-fields/browser.html) specifies a params option. However, this option has not been fully implemented.

Steps to reproduce

Create a browser form field with endpoints and params:

<x-twill::browser
    module-name="publications"
    name="publications"
    label="Publications"
    :endpoint="[
        [
            'value' => '/path/to/publication/browser',
            'label' => 'Publications'
        ]
    ]"
    :params="['publication_type' => type]"
/>

Expected result

I expect the params to be appended to the end of the endpoint path as query parameters, for example: /path/to/publication/browser?page=1&publication_type=type

Actual result

The actual result is that the params are not included in the url query parameters: /path/to/publication/browser?page=1

Versions

Twill version: 3.5.0 Laravel version: 10.48.29 PHP version: 8.2

zachgarwood avatar Mar 27 '25 22:03 zachgarwood