Commit 2d4dd18b authored by Duggan, John's avatar Duggan, John
Browse files

Use custom clear button to avoid writing null/None to Trame state

parent 9f265d65
Loading
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
### nova-trame, 0.25.3

* Clearing NeutronDataSelector file selections will no longer send null/None values to the state (thanks to John Duggan).

### nova-trame, 0.25.2

* NeutronDataSelector should now reset its state properly when changing the instrument or experiment (thanks to John Duggan).
+1 −1
Original line number Diff line number Diff line
[project]
name = "nova-trame"
version = "0.25.2"
version = "0.25.3"
description = "A Python Package for injecting curated themes and custom components into Trame applications"
authors = [
    { name = "John Duggan", email = "dugganjw@ornl.gov" },
+5 −2
Original line number Diff line number Diff line
@@ -201,10 +201,8 @@ class DataSelector(datagrid.VGrid):
                InputField(
                    v_model=self._v_model,
                    classes="flex-0-1 nova-readonly",
                    clearable=True,
                    readonly=True,
                    type="select",
                    click_clear=self.reset,
                ),
            ):
                with vuetify.Template(raw_attrs=['v-slot:selection="{ item, index }"']):
@@ -213,6 +211,11 @@ class DataSelector(datagrid.VGrid):
                        f"(+{{{{ {self._v_model}.length - 2 }}}} others)", v_if="index === 2", classes="text-caption"
                    )

                with vuetify.Template(v_slot_append_inner=True):
                    vuetify.VIcon(
                        "mdi-close-box", v_if=f"{self._v_model}.length > 0", color="primary", size=20, click=self.reset
                    )

    def _create_model(self) -> None:
        state = DataSelectorState()
        self._model = DataSelectorModel(state)
+4 −0
Original line number Diff line number Diff line
@@ -202,6 +202,10 @@ html {

    .v-field {
        margin: 8px 4px 8px 4px;

        &.v-field--appended {
            padding-right: 6px;
        }
    }

    .v-field--active .v-label {