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

The filter on input-group does not work #169

Open
SergShulga opened this issue Apr 29, 2024 · 0 comments
Open

The filter on input-group does not work #169

SergShulga opened this issue Apr 29, 2024 · 0 comments

Comments

@SergShulga
Copy link

I have the following field configuration in a model:

store_min_cost: float = Field(
        default=0.0, nullable=True, title="КЛ ₽(м2) min",
        amis_table_column={'type': "number", 'kilobitSeparator': True, 'sortable': True},
        amis_filter_item=
        {
            "type": "input-group",
            "description": "по умолчанию указан предельный диапазон",
            "validationConfig": {"errorMode": "partial"},
            "body": [
                {
                    "type": "input-text",
                    "size": "sm",
                    "source": "/get_filter_range/?mark=min&model=ComplexBase&field=store_min_cost",
                    "name": "s_min",
                    "autoComplete": False,
                    "validations": {"isNumeric": True, "maximum": "${s_max}"},
                    "validationErrors": {
                        "isNumeric": "Допустимо только числовое значение",
                        "maximum": "Не может превышать правое значение",
                    },
                },
                {
                    "type": "input-text",
                    "size": "sm",
                    "source": "/get_filter_range/?mark=max&model=ComplexBase&field=store_min_cost",
                    "name": "s_max",
                    "autoComplete": False,
                    "validations": {"isNumeric": True, "minimum": "${s_min}"},
                    "validationErrors": {
                        "isNumeric": "Допустимо только числовое значение",
                        "minimum": "Не может быть ниже левого значения",
                    },
                },
            ]
        }
    )

This grouping is necessary to set min\max values. I take the data for the limits from the API (that’s why I can’t use input-range - there is no way to dynamically specify the limit based on data from the database).

I see everything in the filter,
2

but the search does not react in any way to changing values. And when debugging, I see that the value from the form is not forwarded.

1

Any advice is welcome!

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

No branches or pull requests

1 participant