Another comparison between old/new posts. 122 each.
Total Posts: 244 (split chronologically into two equal groups of 122 posts each)
Date Range: February 2020 - September 2024
<select [value]="selectedState()" (change)="onStateChange($event)"> | |
<option *ngFor="let state of states()" [value]="state"> | |
{{ state }} | |
</option> | |
</select> | |
<select | |
[value]="selectedCity()" | |
(change)="onCityChange($event)" | |
[disabled]="isPending()"> |
import { Component, signal, computed, effect, OnInit } from '@angular/core'; | |
import { CommonModule } from '@angular/common'; | |
import { FormsModule } from '@angular/forms'; | |
import { toSignal } from '@angular/core/rxjs-interop'; | |
import { from, switchMap, startWith } from 'rxjs'; | |
@Component({ | |
selector: 'app-chained-selects', | |
standalone: true, | |
imports: [CommonModule, FormsModule], |
<script setup> | |
import { ref, watch, onMounted, computed } from 'vue'; | |
// --- STATE (Equivalent to Svelte's $state / React's useState) --- | |
const states = ref([]); | |
const selectedState = ref(''); | |
const cities = ref([]); | |
const selectedCity = ref(''); | |
// --- LOADING STATE (Mimics Svelte's implicit $effect.pending()) --- |
import React, { useState, useEffect, useCallback } from 'react'; | |
function StateCitySelector() { | |
// State initialization | |
const [states, setStates] = useState([]); | |
const [selectedState, setSelectedState] = useState(''); | |
const [cities, setCities] = useState([]); | |
const [selectedCity, setSelectedCity] = useState(''); | |
// Loading state management (mimics Svelte's implicit $effect.pending()) |
[ | |
{ | |
"title": "Bisan from Gaza: “This is a reminder to boycott Coca-Cola”", | |
"link": "/r/Tunisia/comments/1miqf92/bisan_from_gaza_this_is_a_reminder_to_boycott/", | |
"time": "2025-08-06T00:36:08.659Z" | |
}, | |
{ | |
"title": "An inmate in a California prison donated $17.74 to Gaza. He worked 136 hours to save up.", | |
"link": "/r/Tunisia/comments/1b35gx9/an_inmate_in_a_california_prison_donated_1774_to/", | |
"time": "2024-02-29T17:09:46.562Z" |
{* | |
open themes/[your theme]/templates/checkout/_partials/order-confirmation-table.tpl | |
look for {foreach from=$product.customizations item="customization"} | |
replace that block with the following block | |
*} | |
{foreach from=$product.customizations item="customization"} | |
{foreach from=$customization.fields item="field"} | |
<div class="product-customization-line"> | |
<div class="label" style="text-align: left"> | |
{$field.label} |
export const page_load = async ( | |
{ fetch, route }: RequestEvent, | |
extra_data: Record<string, any> = {} | |
): Promise<any> => { | |
if (!route.id) { | |
return error(401, 'Bad request'); | |
} | |
const backend_url = getBackendURL(route.id, 'page'); | |
for (const [key, value] of Object.entries(extra_data)) { | |
backend_url.searchParams.set(key, value); |
window.dp_calc.subscribe(function(calc) { | |
if (!calc.input_fields) { | |
return | |
} | |
if(calc.input_fields.max_largeur && calc.input_fields.max_hauteur){ | |
const max_largeur = calc.input_fields.max_largeur.value; | |
const max_hauteur = calc.input_fields.max_hauteur.value; | |
window.updateField('largeur', { |