Skip to content

Commit e397407

Browse files
author
NSBuildUser
committed
chore: update 'autocomplete' demo for nativescript-ui-autocomplete v4.0.0
1 parent 876b2bb commit e397407

File tree

13 files changed

+30
-8
lines changed

13 files changed

+30
-8
lines changed

autocomplete/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ This is a demo application that showcases the plugin in action.
44

55
# Running the application
66

7-
If you are coming here for the first time after cloning the repository make sure to build the plugin's code located in the `src` folder. To build it simply run the `npm run postclone` scripts in `src`. After that you can use the NativeScripty CLI commands like `tns run` as usual.
7+
Make sure you are using the latest NativeScript CLI version by running `npm i nativescript -g`. Then run `tns run android` or `tns run ios` depending on the platform you want to run the application on.

autocomplete/app/examples/AsyncData/AsyncData.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { TokenModel } from 'nativescript-ui-autocomplete';
44
import * as http from 'tns-core-modules/http';
55

66
const description = 'Async Data Fetch';
7-
7+
// >> autocomplete-asyncdata-vue
88
export default {
99
name: 'AsyncData',
1010
description: description,
@@ -65,3 +65,4 @@ export default {
6565
});
6666
},
6767
};
68+
// << autocomplete-asyncdata-vue

autocomplete/app/examples/Completion-modes/Completion-modes.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import Contains from './Contains';
33
import StartsWith from './Starts-with';
44

55
const description = 'Completion modes';
6-
6+
// >> autocomplete-completionmode-vue
77
export default {
88
name: 'Completion modes',
99
description: description,
@@ -42,3 +42,4 @@ export default {
4242
},
4343
},
4444
};
45+
// << autocomplete-completionmode-vue

autocomplete/app/examples/Completion-modes/Contains.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import * as frameModule from 'tns-core-modules/ui/frame';
22
import { ObservableArray } from 'tns-core-modules/data/observable-array';
3+
// >> autocomplete-contains-vue
34
import { AutoCompleteCompletionMode } from 'nativescript-ui-autocomplete';
45
import { getCountry, getCountriesCount } from '../data';
56

@@ -49,3 +50,4 @@ export default {
4950
}
5051
}
5152
};
53+
// << autocomplete-contains-vue

autocomplete/app/examples/Completion-modes/Starts-with.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import * as frameModule from 'tns-core-modules/ui/frame';
22
import { ObservableArray } from 'tns-core-modules/data/observable-array';
3+
// >> autocomplete-start-with-vue
34
import { AutoCompleteCompletionMode } from 'nativescript-ui-autocomplete';
45
import { getCountry, getCountriesCount } from '../data';
56

@@ -49,3 +50,4 @@ export default {
4950
}
5051
}
5152
};
53+
// << autocomplete-start-with-vue

autocomplete/app/examples/Display-modes/Tokens.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import * as frameModule from 'tns-core-modules/ui/frame';
22
import { ObservableArray } from 'tns-core-modules/data/observable-array';
3+
// >> autocomplete-token-vue
34
import { AutoCompleteCompletionMode, AutoCompleteDisplayMode } from 'nativescript-ui-autocomplete';
45
import { getCountry, getCountriesCount } from '../data';
56
import DisplayModes from '~/examples/Display-modes/Display-modes';
@@ -51,3 +52,4 @@ export default {
5152
}
5253
}
5354
};
55+
// << autocomplete-token-vue

autocomplete/app/examples/Events/Events.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import * as frameModule from 'tns-core-modules/ui/frame';
22
import { ObservableArray } from 'tns-core-modules/data/observable-array';
3+
// >> autocomplete-events-vue
34
import { RadAutoCompleteTextView } from 'nativescript-ui-autocomplete';
45
import { getCountriesCount, getCountry } from '../data';
56

@@ -131,3 +132,4 @@ export default {
131132
},
132133
},
133134
};
135+
// << autocomplete-events-vue

autocomplete/app/examples/GettingStarted/GettingStarted.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import * as frameModule from 'tns-core-modules/ui/frame';
22
import { ObservableArray } from 'tns-core-modules/data/observable-array';
3+
// >> autocomplete-gettingstarted-vue
34
import { AutoCompleteCompletionMode, AutoCompleteDisplayMode, AutoCompleteSuggestMode } from 'nativescript-ui-autocomplete';
45
import { getCountry, getCountriesCount, getCountryWithImage } from '../data';
56

@@ -100,3 +101,4 @@ export default {
100101
},
101102
},
102103
};
104+
// << autocomplete-gettingstarted-vue

autocomplete/app/examples/Suggest-modes/Append.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import * as frameModule from 'tns-core-modules/ui/frame';
22
import { ObservableArray } from 'tns-core-modules/data/observable-array';
3+
// >> autocomplete-append-mode-vue
34
import { AutoCompleteSuggestMode } from 'nativescript-ui-autocomplete';
45
import { getCountry, getCountriesCount } from '../data';
56
import DisplayModes from '~/examples/Display-modes/Display-modes';
@@ -50,3 +51,4 @@ export default {
5051
}
5152
}
5253
};
54+
// << autocomplete-append-mode-vue

autocomplete/app/examples/Suggest-modes/Suggest-and-append.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import * as frameModule from 'tns-core-modules/ui/frame';
22
import { ObservableArray } from 'tns-core-modules/data/observable-array';
3+
// >> autocomplete-suggest-append-mode-vue
34
import { AutoCompleteSuggestMode } from 'nativescript-ui-autocomplete';
45
import { getCountry, getCountriesCount } from '../data';
56
import DisplayModes from '~/examples/Display-modes/Display-modes';
@@ -50,3 +51,4 @@ export default {
5051
}
5152
}
5253
};
54+
// << autocomplete-suggest-append-mode-vue

autocomplete/app/examples/Suggest-modes/Suggest.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import * as frameModule from 'tns-core-modules/ui/frame';
22
import { ObservableArray } from 'tns-core-modules/data/observable-array';
3+
// >> autocomplete-suggest-mode-vue
34
import { AutoCompleteSuggestMode } from 'nativescript-ui-autocomplete';
45
import { getCountry, getCountriesCount } from '../data';
56

@@ -49,3 +50,4 @@ export default {
4950
}
5051
}
5152
};
53+
// << autocomplete-suggest-mode-vue

autocomplete/app/examples/data.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// >> autocomplete-gettingstarted-data-vue
12
import { TokenModel } from 'nativescript-ui-autocomplete';
23

34
export const countries = [
@@ -51,4 +52,5 @@ export const getCountryWithImage = (i: number) => {
5152

5253
export const getCountriesCount = () => {
5354
return countries.length;
54-
};
55+
};
56+
// << autocomplete-gettingstarted-data-vue

autocomplete/app/main.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
1+
// >> autocomplete-import-vue
12
import Vue from 'nativescript-vue';
2-
3+
// >> (hide)
34
import { getExamples } from './examples';
45
import * as views from './views';
5-
6+
// << (hide)
67
import RadAutoComplete from 'nativescript-ui-autocomplete/vue';
8+
// >> (hide)
79
import { setCssFileName } from "tns-core-modules/application";
810
setCssFileName("app.css");
9-
11+
// << (hide)
1012
Vue.use(RadAutoComplete);
11-
13+
// << autocomplete-import-vue
1214
for (let comp of getExamples()) {
1315
Vue.component(comp.name, comp);
1416
}

0 commit comments

Comments
 (0)