Commit Graph

36 Commits

Author SHA1 Message Date
ralf
7a749a8f54 fix instead of all only last option was selected sometimes
because multiple property was not yet synced to DOM node
2022-03-15 11:43:55 +02:00
ralf
293e9f2fc6 Implement multi-select value as string[] or comma-separated
Had to overwrite some formMixin methods, which considered everything not string as invalid and set/get value to do the right thing for multi-select
Not sure if code should go to Et2WidgetWithSelectMixing to be shared with TagList ...
2022-03-14 21:13:47 +02:00
ralf
940e1b12c1 Implement expand_multiple_rows attribute for Et2Select using Et2InvokerMixin 2022-03-12 14:49:25 +02:00
ralf
dd7ebad1e7 Implement et2-select-account 2022-03-10 20:20:32 +02:00
ralf
9285b87a92 implement multiple attribute for et2-select reflecting it to selectbox
fixing TypeError set_multiple is not a function
2022-03-10 15:48:27 +02:00
nathan
aff71549a2 Move some code out of Et2Select into parent mixin for better re-use
Any child that has selectbox type functionality (extends Et2WidgetWithSelectMixin) needs to implement:
- _optionTargetNode() : HTMLElement
- _optionTemplate(option : SelectOption) : TemplateResult
2022-03-03 10:38:56 -07:00
ralf
5ff96e7818 fix last option select instead of empty label or any other option
eg. "shared by me" in Addressbook instead of "All contacts"
caused by this._inputNode not available when set_value was called
2022-03-01 18:29:13 +02:00
ralf
36e3bd5de0 fix typo modalValue instead of modelValue to get validation (required) working
Had to overwrite formatter as it gave an error for accessing not yet set _inputNode
2022-03-01 16:51:40 +02:00
Hadi Nategh
2d6770ebfa Fix missing Et2WidgetWithSelect class 2022-03-01 13:31:13 +01:00
Hadi Nategh
08549e25da Make Et2WidgetWithSelect a Dedup Mixin in order to make it available cross widgets 2022-03-01 12:35:33 +01:00
ralf
9260f25476 fist option with value of 0 was not selected 2022-02-28 17:42:57 +02:00
ralf
eff1f10484 fix sometimes first non-empty label used for empty value
seems update got triggered before empty_label was set
2022-02-28 15:21:23 +02:00
ralf
e567a0d465 fix et2-select use first option, not just empty_lable, if value is not in options 2022-02-28 14:11:57 +02:00
nathan
f0455b2ad2 Show empty_label when given a value that is not in the list of options 2022-02-23 13:13:14 -07:00
ralf
c2166c5750 fix select-boxes submit their old value, if they are onchange="1"
@Nathan: Not sure if this is the right fix, but I can't see where we use Lit's FormatMixing, which defines serializedValue (and therefore select-box always returns the old modalValue)
2022-02-21 20:58:56 +02:00
nathan
9079f97d7e Fix selectbox values were not set.
Paying more attention to the WebComponent life cycle here, rather than what our widgets do - connectedCallback(), requestUpdate(), updated() are more important than loadFromXML(), etc. which are only used when loading from the .xet the first time.
2022-02-18 12:02:27 -07:00
nathan
1776dd9005 Fix some readonly selectboxes were missing options 2022-02-17 16:37:59 -07:00
nathan
be4633c9fa Implement et2-date-duration 2022-02-16 16:45:40 -07:00
ralf
f29da5e613 fix TypeError with numbers not iterable
also problem with strings - thought no error - as they are iterated letter-wise, which is not what we want here
2022-02-16 10:35:09 +02:00
nathan
3ba1fe1416 Fix action pushed infolog edit dialog really wide 2022-02-15 14:01:07 -07:00
nathan
bc801f9c09 Fix missing import in et2 tests 2022-02-15 12:48:01 -07:00
nathan
650d76bd5c Common cleaning of r/o select value 2022-02-07 13:51:05 -07:00
nathan
b91f66c629 Add some cleanup to find_select_options() make sure we're returning nice arrays instead of objects 2022-02-03 14:45:14 -07:00
nathan
cc9a6bcf8a Don't split single values 2022-01-19 15:57:59 -07:00
nathan
ac808f96e0 some cleanup 2022-01-19 13:18:41 -07:00
nathan
96c174d483 Implement select-account_ro as web component 2022-01-19 13:17:46 -07:00
nathan
32be8200a6 Fix copy/paste error - looks like select-access wasn't implemented in et2 2022-01-17 15:31:25 -07:00
nathan
e07220392d Select widgets with static options as WebComponents 2022-01-17 15:13:50 -07:00
nathan
09cbc44e67 Get cached server-side options working for webcomponent 2022-01-14 09:29:59 -07:00
nathan
20c82b6d72 Starting on selectboxes with static options.
Not entirely sure this is the way to go, but at least we don't have to
 1. copy the options
 2. inherit the whole editable object for a readonly
2022-01-13 15:28:52 -07:00
nathan
fd7e7e2828 Basic tests for Et2Select, & fixes for bugs they revealed 2022-01-07 14:13:38 -07:00
nathan
57860e03db Get onchange working (for select widget) 2022-01-06 16:22:55 -07:00
nathan
4ed888476c Deal with some IDE warnings
better documentation of things tried
2022-01-05 13:14:28 -07:00
nathan
a48e6cf1d3 - Add cssImage() to help with putting our images into LitElement CSS blocks
- Some code cleanup
2022-01-05 10:21:18 -07:00
nathan
85f753324d Remove unused import 2022-01-05 08:07:01 -07:00
nathan
f8ab5c521e Selectbox webcomponent 2022-01-04 15:38:10 -07:00