Warning: The magic method SFML_Singleton::__wakeup() must have public visibility in /home/public/wp-content/plugins/sf-move-login/inc/classes/class-sfml-singleton.php on line 72
front-end – Thoughts, etc.

Thoughts, etc.

Tracking the occasional random walk

front-end

Side effects of js-data-http and async operations

2018-06-15 / Leave a Comment

Recently I encountered a rather strange scenario, wherein I created two different  findAll operations using the js-data-http adapter for a js-data query, only to see two identical network requests emitted. The root of the problem turned out to be that I was creating a single object to hold the query options and reusing it across requests, in … [Read more…]

Posted in: code, front-end Tagged: js-data

Adding Vue reactivity to js-data relationships

2018-05-16 / 3 Comments

While attempting to have Vue components react to changes in my js-data model instances and their relationships, I found a great post from Caleb Roseland with an accompanying code example. They detail how to make model properties reactive in Vue, without overriding js-data’s own reactivity. What they don’t discuss is how to make Vue react … [Read more…]

Posted in: front-end Tagged: js-data, vue

Clearing an Ember Paper select component

2017-09-01 / Leave a Comment

To allow users to clear the selection of an Ember Paper {{paper-select}} component, simply pass it the  allowClear=true option:

Allowing a paper-select component to be cleared
1
2
3
4
5
6
{{#paper-select
    placeholder="Select a thing..."
    required=false
    allowClear=true
    ...
}}

This option is passed along to the ember-power-select component that ember-paper uses under the hood, so the resulting clear button can be styled accordingly. For example,

Styling the clear-selection button
Sass
1
2
3
4
.ember-power-select-clear-btn {
  position: absolute;
  right: 25px;
}

Thanks to @miguelcobain for this tip on the community Slack channel.

Posted in: front-end Tagged: ember, ember-paper