-
Notifications
You must be signed in to change notification settings - Fork 1
Feature/select model #21
Feature/select model #21
Conversation
@fungjj92 just merged her chart controls PR, which adds the ng2 bootstrap lib and removes the bootstrap lib. It looks like this PR makes use of the modal and dropdown bootstrap js, and needs a rebase to switch to the ng2 bootstrap versions of those components. Otherwise looks great! |
There's no bootstrap JS in here, just styling classes and a TODO about maybe switching in future to an ng2-bootstrap component once it's stable. |
Also wire up to one of the prototype select fields, but styling is broken.
Hacky workaround to reading changed model value for multiselect.
Listen to `ngModelChange` instead of `change` to get set value from select field. On `change` event, model holds previous value and event target for multiselect is not readily accessible.
Change button to open modal directly, since other options do not apply. Close modal with update button and add listener.
Used for checkbox filtering.
Request list of scenarios from server; use default constant scenario for selection.
Mostly changing references to `String` wrapper to `string`.
There's JS somewhere that's making the modal/dropdowns work right now, I assumed it was the |
Okay, a rebase off of develop has broken the dropdowns (which were already present an functioning, in mock form). I'll look into it. |
Yup, thats it. If i remove the |
I updated my constants.ts file to include the new constants, does your webpack linter throw these errors:
Here's what my constants file looks like now:
|
No, I don't see those errors. It seems the linter requires a server restart to silence warnings related to changes, though it doesn't interfere with functionality. |
The bootstrap library switch radically changes how components are used, as it requires loading directives now. The dropdown is a relatively straightforward fix, but the modal update is causing issues. |
Fix broken bootstrap components by switching to ng2-bootstrap directive syntax. Backdrop on modal is disabled as workaround for ng2-bootstrap/#854.
82747c0
to
778de54
Compare
Ok, rebased off develop and fixed the dropdown and modal broken by the bootstrap library switch. The backdrop on the modal has been disabled temporarily as a workaround for valor-software/ngx-bootstrap#854. |
👍 |
Implements two selectors in the navbar, one for changing the scenario, and the other for selecting models. There's not an obvious/easy way to switch back to selecting all models yet. If we move towards using ng2-angular components, I think it might be good to use their multi-select instead of the existing modal of checkboxes from the prototype that I wired up for the model selector here.
This moves the remaining default API query options into the
constants.ts
file, so there are three new constants that will need to be added to run this.After rebasing off of develop, a number of new typechecker warnings appeared, mostly suggesting using
string
instead ofString
, so I have made those changes (there are no linter warnings now.)