Skip to content

Commit 22797f1

Browse files
committed
deprecate key-up
1 parent 1889a9b commit 22797f1

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

addon/components/bulma-input.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import Ember from 'ember';
22
import layout from '../templates/components/bulma-input';
3-
import computed, { readOnly, alias, bool, or } from 'ember-computed-decorators';
3+
import computed, { alias } from 'ember-computed-decorators';
44
import { makeString, nativeAttrs, deprecations } from '../utils';
55

66
const {
@@ -40,7 +40,8 @@ export default Component.extend({
4040
deprecations([
4141
{ name: 'control', value: get(this, 'control') },
4242
{ name: 'isLoading', value: get(this, 'isLoading')},
43-
{ name: 'isTextarea', value: get(this, 'isTextarea')}
43+
{ name: 'isTextarea', value: get(this, 'isTextarea')},
44+
{ name: 'key-up', value: get(this, 'key-up')}
4445
]);
4546
}
4647
});

addon/utils.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,8 @@ export const deprecations = (items) => {
8686
let msg = {
8787
control: `control=true is no longer supported. Please wrap the component in a bulma-control component, or with a container using the class .control`,
8888
isTextarea: `isTextarea=true is no longer supported. Please use bulma-textarea component instead`,
89-
isLoading: `isLoading=true is no longer supported. Please wrap the component in a bulma-control container with the isLoading flag, or any container using the classes .control and .is-loading`
89+
isLoading: `isLoading=true is no longer supported. Please wrap the component in a bulma-control container with the isLoading flag, or any container using the classes .control and .is-loading`,
90+
'key-up': `key-up is no longer supported as an event. Please use oninput or some other native event handler instead.`
9091
};
9192

9293
items.forEach((item) => {

tests/dummy/app/templates/uielements/form-controls.hbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ mySubmitAction(button) {
328328
{{#bulma-column content=true isHalf=true}}
329329
{{#bulma-control hasAddons=true}}
330330
{{bulma-select options=demo.currencies onchange=(action (mut demo.currency)) value="target.value"}}
331-
{{bulma-input type="number" placeholder="Email" placeholder="Enter an amount" value=demo.amount key-up=(action "format" demo.amount)}}
331+
{{bulma-input type="number" placeholder="Email" placeholder="Enter an amount" value=demo.amount oninput=(action "format" demo.amount)}}
332332
{{bulma-button label="Transfer" isSuccess=true onmousedown=(action "transfer" demo.amount demo.currency)}}
333333
{{/bulma-control}}
334334
<p>

0 commit comments

Comments
 (0)