Loading src/nova/trame/view/components/data_selector.py +6 −6 Original line number Diff line number Diff line Loading @@ -116,9 +116,9 @@ class DataSelector(datagrid.VGrid): ).exec self._reset_state = client.JSEval(exec=f"{self._v_model} = []; {self._flush_state}").exec self.create_model() self.create_viewmodel() self.setup_bindings() self._create_model() self._create_viewmodel() self._setup_bindings() self.create_ui(**kwargs) Loading Loading @@ -213,11 +213,11 @@ class DataSelector(datagrid.VGrid): f"(+{{{{ {self._v_model}.length - 2 }}}} others)", v_if="index === 2", classes="text-caption" ) def create_model(self) -> None: def _create_model(self) -> None: state = DataSelectorState() self._model = DataSelectorModel(state) def create_viewmodel(self) -> None: def _create_viewmodel(self) -> None: server = get_server(None, client_type="vue3") binding = TrameBinding(server.state) Loading Loading @@ -247,7 +247,7 @@ class DataSelector(datagrid.VGrid): # This method sets up Trame state change listeners for each binding parameter that can be changed directly by this # component. This allows us to communicate the changes to the developer's bindings without requiring our own. We # don't want bindings in the internal implementation as our callbacks could compete with the developer's. def setup_bindings(self) -> None: def _setup_bindings(self) -> None: # If the bindings were given initial values, write these to the state. set_state_param(self.state, self._directory) set_state_param(self.state, self._extensions) Loading src/nova/trame/view/components/ornl/neutron_data_selector.py +3 −3 Original line number Diff line number Diff line Loading @@ -138,11 +138,11 @@ class NeutronDataSelector(DataSelector): ) InputField(v_else=True, v_model=f"{self._state_name}.custom_directory", column_span=2) def create_model(self) -> None: def _create_model(self) -> None: state = NeutronDataSelectorState() self._model: NeutronDataSelectorModel = NeutronDataSelectorModel(state) def create_viewmodel(self) -> None: def _create_viewmodel(self) -> None: server = get_server(None, client_type="vue3") binding = TrameBinding(server.state) Loading @@ -160,7 +160,7 @@ class NeutronDataSelector(DataSelector): # This method sets up Trame state change listeners for each binding parameter that can be changed directly by this # component. This allows us to communicate the changes to the developer's bindings without requiring our own. We # don't want bindings in the internal implementation as our callbacks could compete with the developer's. def setup_bindings(self) -> None: def _setup_bindings(self) -> None: # If the bindings were given initial values, write these to the state. set_state_param(self.state, self._facility) set_state_param(self.state, self._instrument) Loading Loading
src/nova/trame/view/components/data_selector.py +6 −6 Original line number Diff line number Diff line Loading @@ -116,9 +116,9 @@ class DataSelector(datagrid.VGrid): ).exec self._reset_state = client.JSEval(exec=f"{self._v_model} = []; {self._flush_state}").exec self.create_model() self.create_viewmodel() self.setup_bindings() self._create_model() self._create_viewmodel() self._setup_bindings() self.create_ui(**kwargs) Loading Loading @@ -213,11 +213,11 @@ class DataSelector(datagrid.VGrid): f"(+{{{{ {self._v_model}.length - 2 }}}} others)", v_if="index === 2", classes="text-caption" ) def create_model(self) -> None: def _create_model(self) -> None: state = DataSelectorState() self._model = DataSelectorModel(state) def create_viewmodel(self) -> None: def _create_viewmodel(self) -> None: server = get_server(None, client_type="vue3") binding = TrameBinding(server.state) Loading Loading @@ -247,7 +247,7 @@ class DataSelector(datagrid.VGrid): # This method sets up Trame state change listeners for each binding parameter that can be changed directly by this # component. This allows us to communicate the changes to the developer's bindings without requiring our own. We # don't want bindings in the internal implementation as our callbacks could compete with the developer's. def setup_bindings(self) -> None: def _setup_bindings(self) -> None: # If the bindings were given initial values, write these to the state. set_state_param(self.state, self._directory) set_state_param(self.state, self._extensions) Loading
src/nova/trame/view/components/ornl/neutron_data_selector.py +3 −3 Original line number Diff line number Diff line Loading @@ -138,11 +138,11 @@ class NeutronDataSelector(DataSelector): ) InputField(v_else=True, v_model=f"{self._state_name}.custom_directory", column_span=2) def create_model(self) -> None: def _create_model(self) -> None: state = NeutronDataSelectorState() self._model: NeutronDataSelectorModel = NeutronDataSelectorModel(state) def create_viewmodel(self) -> None: def _create_viewmodel(self) -> None: server = get_server(None, client_type="vue3") binding = TrameBinding(server.state) Loading @@ -160,7 +160,7 @@ class NeutronDataSelector(DataSelector): # This method sets up Trame state change listeners for each binding parameter that can be changed directly by this # component. This allows us to communicate the changes to the developer's bindings without requiring our own. We # don't want bindings in the internal implementation as our callbacks could compete with the developer's. def setup_bindings(self) -> None: def _setup_bindings(self) -> None: # If the bindings were given initial values, write these to the state. set_state_param(self.state, self._facility) set_state_param(self.state, self._instrument) Loading